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)

View File

@@ -37,6 +37,7 @@ class Feature(Enum):
BEAUTY_LEG = 13, "腿来能力 [美腿, 腿来]"
VIDEO = 14, "视频点播功能 [黑丝视频, 黑丝, 来个黑丝,搞个黑丝]"
VIDEO_MAN = 15, "视频肌肉男点播功能 [猛男, 肌肉, 帅哥]"
GROUP_ADD = 16, "加群提醒功能"
def __new__(cls, value, description):
obj = object.__new__(cls)