mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
用nonebot自带get_bot
This commit is contained in:
parent
e6700621fc
commit
30003ff6df
@ -63,13 +63,6 @@ broadcast = on_command('广播', permission=SUPERUSER, rule=to_me(), priority=1,
|
||||
})
|
||||
|
||||
|
||||
def get_bot() -> Optional[Bot]:
|
||||
try:
|
||||
return list(nonebot.get_bots().values())[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@update_cmd.handle()
|
||||
async def _(event: MessageEvent):
|
||||
|
Loading…
Reference in New Issue
Block a user