feature:加群提醒功能
This commit is contained in:
@@ -6,7 +6,7 @@ import tomllib
|
|||||||
import redis
|
import redis
|
||||||
from wcferry import Wcf, WxMsg
|
from wcferry import Wcf, WxMsg
|
||||||
|
|
||||||
from robot_cmd.robot_command import GroupBotManager
|
from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
|
||||||
|
|
||||||
|
|
||||||
class GroupAdd:
|
class GroupAdd:
|
||||||
@@ -28,6 +28,11 @@ class GroupAdd:
|
|||||||
def handle_message(self, message: WxMsg):
|
def handle_message(self, message: WxMsg):
|
||||||
if not self.enable:
|
if not self.enable:
|
||||||
return
|
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"))
|
now_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
||||||
nick_name = self.all_contacts.get(message.sender, message.sender)
|
nick_name = self.all_contacts.get(message.sender, message.sender)
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class Feature(Enum):
|
|||||||
BEAUTY_LEG = 13, "腿来能力 [美腿, 腿来]"
|
BEAUTY_LEG = 13, "腿来能力 [美腿, 腿来]"
|
||||||
VIDEO = 14, "视频点播功能 [黑丝视频, 黑丝, 来个黑丝,搞个黑丝]"
|
VIDEO = 14, "视频点播功能 [黑丝视频, 黑丝, 来个黑丝,搞个黑丝]"
|
||||||
VIDEO_MAN = 15, "视频肌肉男点播功能 [猛男, 肌肉, 帅哥]"
|
VIDEO_MAN = 15, "视频肌肉男点播功能 [猛男, 肌肉, 帅哥]"
|
||||||
|
GROUP_ADD = 16, "加群提醒功能"
|
||||||
|
|
||||||
def __new__(cls, value, description):
|
def __new__(cls, value, description):
|
||||||
obj = object.__new__(cls)
|
obj = object.__new__(cls)
|
||||||
|
|||||||
Reference in New Issue
Block a user