feat: 整合开发历史 (#20),大更新。。。

This commit is contained in:
镀铬酸钾
2026-01-04 22:21:35 +08:00
committed by GitHub
parent 0965123c1d
commit a733d3dc4b
25 changed files with 2199 additions and 506 deletions

View File

@@ -29,18 +29,26 @@ async def handle_echo(bot: Bot, event: MessageEvent, args: list[str]):
await event.reply(reply_msg)
@matcher.command("赞我")
async def handle_poke(bot: Bot, event: MessageEvent, args: list[str]):
@matcher.command(
"赞我",
permission=MessageEvent.ADMIN,
override_permission_check=True
)
async def handle_poke(bot: Bot, event: MessageEvent, permission_granted: bool):
"""
处理 赞我 指令,发送点赞
:param bot: Bot 实例
:param event: 消息事件对象
:param args: 指令参数列表(本指令不使用参数)
:param permission_granted: 权限检查结果
"""
if not permission_granted:
await event.reply("只有我的操作员才能让我点赞哦!(。•ˇ‸ˇ•。)")
return
try:
# 尝试发送赞
await bot.send_like(event.user_id, times=10)
await event.reply("戳一戳发送成功!")
await event.reply("好感度+10(〃''〃)")
except Exception as e:
await event.reply(f"戳一戳发送失败:{str(e)}")
await event.reply(f"点赞失败了 >_<: {str(e)}")