🎨 代码优化

This commit is contained in:
HibiKier
2024-08-24 19:32:52 +08:00
parent f69253616e
commit 45c6dbd2ce
36 changed files with 149 additions and 209 deletions
@@ -44,7 +44,7 @@ __plugin_meta__ = PluginMetadata(
RegisterConfig(
module="invite_manager",
key="message",
value=f"请不要未经同意就拉{BotConfig.nickname}入群!告辞!",
value=f"请不要未经同意就拉{BotConfig.self_nickname}入群!告辞!",
help="强制拉群后进群回复的内容",
),
RegisterConfig(
@@ -88,8 +88,6 @@ __plugin_meta__ = PluginMetadata(
)
superuser = nonebot.get_driver().config.platform_superusers["qq"][0]
base_config = Config.get("invite_manager")
@@ -108,6 +106,7 @@ add_group = on_request(priority=1, block=False)
@group_increase_handle.handle()
async def _(bot: Bot, event: GroupIncreaseNoticeEvent | GroupMemberIncreaseEvent):
superuser = BotConfig.get_superuser("qq")
user_id = str(event.user_id)
group_id = str(event.group_id)
if user_id == bot.self_id: