临时调整权限模块,备份

This commit is contained in:
liuwei
2025-06-09 14:12:31 +08:00
parent cedab1cefd
commit 9d15bf965b
30 changed files with 882 additions and 138 deletions

View File

@@ -21,6 +21,10 @@ from wechat_ipad.models.message import WxMessage
class PointTradePlugin(MessagePluginInterface):
"""积分交易插件"""
# 功能权限常量
FEATURE_KEY = "POINT_TRADE"
FEATURE_DESCRIPTION = "💱 积分交易功能 [积分交易, 积分转账, 我的积分, 积分排行, 打劫, 保释]"
@property
def name(self) -> str:
return "积分交易"
@@ -45,11 +49,21 @@ class PointTradePlugin(MessagePluginInterface):
def commands(self) -> List[str]:
return self._commands
@property
def feature_key(self) -> Optional[str]:
return self.FEATURE_KEY
@property
def feature_description(self) -> Optional[str]:
return self.FEATURE_DESCRIPTION
def __init__(self):
super().__init__()
self.db_pool = None
self.bot: WechatAPIClient = None
self.revoke: MessageAutoRevoke = None
# 注册功能权限
self.feature = self.register_feature()
def initialize(self, context: Dict[str, Any]) -> bool:
"""初始化插件"""