jieba~=0.42.1 删除
This commit is contained in:
@@ -193,7 +193,6 @@ class JDTokenPlugin(MessagePluginInterface):
|
|||||||
return command in self._commands
|
return command in self._commands
|
||||||
|
|
||||||
@plugin_stats_decorator(plugin_name="京东签到Token设置")
|
@plugin_stats_decorator(plugin_name="京东签到Token设置")
|
||||||
@plugin_points_cost(2, "京东签到Token设置消耗积分", Feature.UTILITY)
|
|
||||||
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
||||||
"""处理消息"""
|
"""处理消息"""
|
||||||
content = str(message.get("content", "")).strip()
|
content = str(message.get("content", "")).strip()
|
||||||
@@ -214,7 +213,7 @@ class JDTokenPlugin(MessagePluginInterface):
|
|||||||
return False, "命令格式错误"
|
return False, "命令格式错误"
|
||||||
|
|
||||||
# 检查权限
|
# 检查权限
|
||||||
if roomid and gbm.get_group_permission(roomid, Feature.UTILITY) == PermissionStatus.DISABLED:
|
if roomid and gbm.get_group_permission(roomid, Feature.JD_TOKEN) == PermissionStatus.DISABLED:
|
||||||
return False, "没有权限"
|
return False, "没有权限"
|
||||||
|
|
||||||
# 提取token和备注
|
# 提取token和备注
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class WeatherPlugin(MessagePluginInterface):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@plugin_stats_decorator(plugin_name="天气查询")
|
@plugin_stats_decorator(plugin_name="天气查询")
|
||||||
@plugin_points_cost(1, "天气查询消耗积分", Feature.UTILITY)
|
@plugin_points_cost(2, "天气查询消耗积分", Feature.WEATHER)
|
||||||
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
async def process_message(self, message: Dict[str, Any]) -> Tuple[bool, Optional[str]]:
|
||||||
"""处理消息"""
|
"""处理消息"""
|
||||||
content = str(message.get("content", "")).strip()
|
content = str(message.get("content", "")).strip()
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class Feature(Enum):
|
|||||||
# KID_PHOTO_EXTRACT = 19, "儿童照片提取转发功能" # 小朋友照片提取功能
|
# KID_PHOTO_EXTRACT = 19, "儿童照片提取转发功能" # 小朋友照片提取功能
|
||||||
NEWS = 20, "全球政治经济新闻"
|
NEWS = 20, "全球政治经济新闻"
|
||||||
WEATHER = 21, "天气查询"
|
WEATHER = 21, "天气查询"
|
||||||
|
JD_TOKEN = 22, "JD_京豆token设置"
|
||||||
|
|
||||||
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