去除网易云音乐那个名称
This commit is contained in:
@@ -11,7 +11,7 @@ from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
|
|||||||
|
|
||||||
|
|
||||||
class GroupAdd:
|
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:
|
with open("group_add/config.toml", "rb") as f:
|
||||||
plugin_config = tomllib.load(f)
|
plugin_config = tomllib.load(f)
|
||||||
@@ -22,7 +22,6 @@ class GroupAdd:
|
|||||||
self.enable = config["enable"]
|
self.enable = config["enable"]
|
||||||
self.wcf = wcf
|
self.wcf = wcf
|
||||||
self.gbm = gbm
|
self.gbm = gbm
|
||||||
self.all_contacts = all_contacts
|
|
||||||
|
|
||||||
self.LOG.info(f"[加群提醒] 组件初始化完成")
|
self.LOG.info(f"[加群提醒] 组件初始化完成")
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class BotMusic:
|
|||||||
<scene>0</scene>
|
<scene>0</scene>
|
||||||
<appinfo>
|
<appinfo>
|
||||||
<version>49</version>
|
<version>49</version>
|
||||||
<appname>网易云音乐</appname>
|
<appname></appname>
|
||||||
</appinfo>
|
</appinfo>
|
||||||
<commenturl />
|
<commenturl />
|
||||||
</msg>"""
|
</msg>"""
|
||||||
|
|||||||
5
robot.py
5
robot.py
@@ -98,7 +98,7 @@ class Robot(Job):
|
|||||||
# 美腿模块
|
# 美腿模块
|
||||||
self.beautyleg = BeautyLeg(wcf, self.gbm)
|
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 ChatType.is_in_chat_types(chat_type):
|
||||||
if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT):
|
if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT):
|
||||||
@@ -275,8 +275,6 @@ class Robot(Job):
|
|||||||
receivers = msg.roomid
|
receivers = msg.roomid
|
||||||
self.sendTextMsg(content, receivers, msg.sender)
|
self.sendTextMsg(content, receivers, msg.sender)
|
||||||
"""
|
"""
|
||||||
# 风控处理,随机延迟发送,解决群消息高频发送导致的微信风险
|
|
||||||
time.sleep(random.uniform(0.3, 2.0))
|
|
||||||
|
|
||||||
# 群聊消息
|
# 群聊消息
|
||||||
if msg.from_group():
|
if msg.from_group():
|
||||||
@@ -323,7 +321,6 @@ class Robot(Job):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.LOG.error(f"game_message_load error:{e}")
|
self.LOG.error(f"game_message_load error:{e}")
|
||||||
try:
|
try:
|
||||||
# TODO 群人员添加也是消息类型10000的消息
|
|
||||||
if msg.type == 10000:
|
if msg.type == 10000:
|
||||||
self.LOG.info(msg)
|
self.LOG.info(msg)
|
||||||
self.group_add.handle_message(msg)
|
self.group_add.handle_message(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user