nonebot / aiocqhttp

A Python SDK with async I/O for CQHTTP (OneBot).
https://aiocqhttp.nonebot.dev
MIT License
280 stars 39 forks source link

friend_add 命令无法触发? #19

Closed fqb closed 4 years ago

fqb commented 5 years ago

接收不到friend_add类型的消息, 下面代码触发不了 @bot.on_notice('friend_add') async def handle_add_new_friend(context): print(context) await bot.send(context, message='您好!', at_sender=True, auto_escape=True) 不能直接给新加入的好友发送消息,只能对方主动发消息后才能给新加好友发送消息。

stdrc commented 5 years ago

可以看一下 酷Q 日志里面有没有添加好友成功的日志,如果有,那 @bot.on_notice 会触发的