临时调整权限模块,备份
This commit is contained in:
@@ -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:
|
||||
"""初始化插件"""
|
||||
|
||||
Reference in New Issue
Block a user