From df472f61143cafbf48495c872fed6156292b69a1 Mon Sep 17 00:00:00 2001 From: yzhh <31803608+OasisAkari@users.noreply.github.com> Date: Sun, 30 Jul 2023 00:24:35 +0800 Subject: [PATCH] update --- bots/aiocqhttp/bot.py | 6 ++++-- config/config.toml.example | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bots/aiocqhttp/bot.py b/bots/aiocqhttp/bot.py index 0e2e1fdd..ca32619a 100644 --- a/bots/aiocqhttp/bot.py +++ b/bots/aiocqhttp/bot.py @@ -117,10 +117,12 @@ async def _(event: Event): async def _(event: Event): if BotDBUtil.SenderInfo('QQ|' + str(event.user_id)).query.isSuperUser: return {'approve': True} - if Config('qq_invite_join_group_notice'): + if not Config('allow_bot_auto_agree_group_invite'): await bot.send_private_msg(user_id=event.user_id, message='你好!本机器人暂时不主动同意入群请求。\n' - '请至https://github.com/Teahouse-Studios/bot/issues/new?assignees=OasisAkari&labels=New&template=add_new_group.yaml&title=%5BNEW%5D%3A+申请入群。') + f'请至{Config("qq_join_group_application_link")}申请入群。') + else: + return {'approve': True} @bot.on_notice('group_ban') diff --git a/config/config.toml.example b/config/config.toml.example index 0bdaf926..9d861203 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -40,6 +40,8 @@ qq_invite_join_group_notice = true qq_disable_temp_session = false qq_enable_listening_self_message = false allow_request_private_ip = false +allow_bot_auto_agree_group_invite = false +qq_join_group_application_link = "https://github.com/Teahouse-Studios/bot/issues/new?assignees=OasisAkari&labels=New&template=add_new_group.yaml&title=%5BNEW%5D%3A+" slower_schedule = false enable_dirty_check = true enable_urlmanager = true