⚗️ add got receive overload #142

This commit is contained in:
yanyongyu
2021-01-06 18:29:24 +08:00
parent a211f09a99
commit b6bf477551
2 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,19 @@
from nonebot import on_command
from nonebot.adapters.cqhttp import Bot, PrivateMessageEvent, GroupMessageEvent
overload = on_command("overload")
@overload.handle()
async def handle_first_receive(bot: Bot):
return
@overload.got("message", prompt="群?")
async def handle_group(bot: Bot, event: GroupMessageEvent):
return
@overload.got("message", prompt="私?")
async def handle_private(bot: Bot, event: PrivateMessageEvent):
return