fix auto agree

This commit is contained in:
felinae98 2021-02-09 12:59:17 +08:00
parent 751331262c
commit a43289f1da
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

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