mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +08:00
20 lines
454 B
Python
20 lines
454 B
Python
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
|