mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
fix auto agree
This commit is contained in:
parent
751331262c
commit
a43289f1da
@ -9,10 +9,10 @@ friend_req = on_request(priority=5)
|
||||
|
||||
@friend_req.handle()
|
||||
async def add_superuser(bot: Bot, event: RequestEvent, state: T_State):
|
||||
if event.user_id in bot.config.superusers and event.request_type == 'private':
|
||||
if str(event.user_id) in bot.config.superusers and event.request_type == 'private':
|
||||
await event.approve(bot)
|
||||
logger.info('add user {}'.format(event.user_id))
|
||||
elif event.sub_type == 'invite' and event.user_id in bot.config.superusers and event.request_type == 'group':
|
||||
elif event.sub_type == 'invite' and str(event.user_id) in bot.config.superusers and event.request_type == 'group':
|
||||
await event.approve(bot)
|
||||
logger.info('add group {}'.format(event.group_id))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user