mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +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()
|
@update_cmd.handle()
|
||||||
async def _(event: MessageEvent):
|
async def _(event: MessageEvent):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user