调整虚拟群组
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
[GroupVirtual]
|
||||||
enable = true
|
enable = true
|
||||||
command = ["#创建跨群", "#添加群", "#查看跨群列表", "#查看跨群", "#退出跨群", "#解散跨群"]
|
command = ["#创建跨群", "#添加群", "#查看跨群列表", "#查看跨群", "#退出跨群", "#解散跨群"]
|
||||||
|
|
||||||
|
|||||||
@@ -94,12 +94,8 @@ class GroupVirtualPlugin(MessagePluginInterface):
|
|||||||
if not self.enable:
|
if not self.enable:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
content = str(message.get("content", "")).strip()
|
|
||||||
roomid = message.get("roomid", "")
|
roomid = message.get("roomid", "")
|
||||||
|
|
||||||
if GroupBotManager.get_group_permission(roomid, self.feature) == PermissionStatus.DISABLED:
|
|
||||||
return False
|
|
||||||
|
|
||||||
# 只处理群消息
|
# 只处理群消息
|
||||||
if not roomid:
|
if not roomid:
|
||||||
return False
|
return False
|
||||||
@@ -126,7 +122,7 @@ class GroupVirtualPlugin(MessagePluginInterface):
|
|||||||
return False, "该群不在任何虚拟聊天组中"
|
return False, "该群不在任何虚拟聊天组中"
|
||||||
|
|
||||||
# 生成消息唯一标识(用于防止循环转发)
|
# 生成消息唯一标识(用于防止循环转发)
|
||||||
message_id = f"{message.get('id')}_{message.get('timestamp')}"
|
message_id = f"{full_wx_msg.msg_id}_{full_wx_msg.create_time}"
|
||||||
if message_id in self.message_cache:
|
if message_id in self.message_cache:
|
||||||
return False, "消息已经转发过"
|
return False, "消息已经转发过"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user