用nonebot自带get_bot

This commit is contained in:
惜月 2023-01-13 13:33:24 +08:00 committed by GitHub
parent e6700621fc
commit 30003ff6df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):