feature:积分交易功能上线

This commit is contained in:
liuwei
2025-03-05 12:17:05 +08:00
parent 4610b4433b
commit 8970705771
2 changed files with 6 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ from datetime import datetime
from wcferry import Wcf, WxMsg
from robot_cmd.robot_command import GroupBotManager
from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
import xml.etree.ElementTree as ET
@@ -78,6 +78,10 @@ class PointTrade:
self.wcf.send_text(f"-----Bot-----\n❌命令格式错误!{self.command_format}",
(message.roomid if message.from_group() else message.sender), message.sender)
return
if self.gbm.get_group_permission(message.roomid, Feature.POINT_TRADE) == PermissionStatus.DISABLED:
return
if not command[1].isdigit():
self.wcf.send_text(f"-----Bot-----\n🈚️转账积分无效(必须为正整数!) \n{self.command_format}",
(message.roomid if message.from_group() else message.sender), message.sender)

View File

@@ -33,6 +33,7 @@ class Feature(Enum):
TASK_GAME = 9, "百科答题游戏"
MUSIC = 10, "点歌功能"
SIGNIN = 11, "签到功能"
POINT_TRADE = 12, "积分赠送功能"
def __new__(cls, value, description):
obj = object.__new__(cls)