feature:加群提醒功能

This commit is contained in:
liuwei
2025-03-10 15:02:41 +08:00
parent 037b712340
commit 9d7afb63f2
2 changed files with 7 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ import tomllib
import redis
from wcferry import Wcf, WxMsg
from robot_cmd.robot_command import GroupBotManager
from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
class GroupAdd:
@@ -28,6 +28,11 @@ class GroupAdd:
def handle_message(self, message: WxMsg):
if not self.enable:
return
# 如果触发了指令,但是没有权限,则返回权限不足
if self.gbm.get_group_permission(message.roomid, Feature.GROUP_ADD) == PermissionStatus.DISABLED:
return
now_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
nick_name = self.all_contacts.get(message.sender, message.sender)