From 29970a27bc2320138c603849dda42c42389dd654 Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 11 Mar 2025 09:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E7=BD=91=E6=98=93=E4=BA=91?= =?UTF-8?q?=E9=9F=B3=E4=B9=90=E9=82=A3=E4=B8=AA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group_add/main.py | 3 +-- music/bot_music.py | 2 +- robot.py | 5 +---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/group_add/main.py b/group_add/main.py index 13d9d5f..b228ed9 100644 --- a/group_add/main.py +++ b/group_add/main.py @@ -11,7 +11,7 @@ from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus class GroupAdd: - def __init__(self, wcf: Wcf, gbm: GroupBotManager, all_contacts: dict): + def __init__(self, wcf: Wcf, gbm: GroupBotManager): # 读取配置文件 with open("group_add/config.toml", "rb") as f: plugin_config = tomllib.load(f) @@ -22,7 +22,6 @@ class GroupAdd: self.enable = config["enable"] self.wcf = wcf self.gbm = gbm - self.all_contacts = all_contacts self.LOG.info(f"[加群提醒] 组件初始化完成") diff --git a/music/bot_music.py b/music/bot_music.py index 8ba2d26..df1655b 100644 --- a/music/bot_music.py +++ b/music/bot_music.py @@ -151,7 +151,7 @@ class BotMusic: 0 49 - 网易云音乐 + """ diff --git a/robot.py b/robot.py index d4fd5a6..14165a1 100644 --- a/robot.py +++ b/robot.py @@ -98,7 +98,7 @@ class Robot(Job): # 美腿模块 self.beautyleg = BeautyLeg(wcf, self.gbm) # 加群测试 - self.group_add = GroupAdd(wcf, self.gbm, self.allContacts) + self.group_add = GroupAdd(wcf, self.gbm) if ChatType.is_in_chat_types(chat_type): if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT): @@ -275,8 +275,6 @@ class Robot(Job): receivers = msg.roomid self.sendTextMsg(content, receivers, msg.sender) """ - # 风控处理,随机延迟发送,解决群消息高频发送导致的微信风险 - time.sleep(random.uniform(0.3, 2.0)) # 群聊消息 if msg.from_group(): @@ -323,7 +321,6 @@ class Robot(Job): except Exception as e: self.LOG.error(f"game_message_load error:{e}") try: - # TODO 群人员添加也是消息类型10000的消息 if msg.type == 10000: self.LOG.info(msg) self.group_add.handle_message(msg)