feature:加群提醒功能
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user