mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
fix(notification): 飞书/QQ/爪爪机器人跳过命令注册,修复 AttributeError
通知基类默认命令注册钩子调用 client.register_commands,但飞书 lark_oapi、 QQBot、WechatClawBot 客户端均无命令注册/删除 API(飞书机器人无斜杠命令概念), 启动时 FeishuModule.register_commands 抛 AttributeError。 三个模块覆写 _commands_enabled 返回 False 跳过注册,与企业微信走菜单 API 的钩子模式一致;Telegram/Slack/Discord 客户端具备该 API,不受影响。
This commit is contained in:
@@ -61,6 +61,13 @@ class WechatClawBotModule(_MessageChannelModuleBase[WechatClawBot]):
|
||||
"""获取模块优先级。"""
|
||||
return 2
|
||||
|
||||
def _commands_enabled(self, config: Optional[dict]) -> bool:
|
||||
"""
|
||||
微信爪爪机器人客户端未提供命令注册/删除 API,跳过命令注册,
|
||||
避免基类默认钩子调用不存在的 client.register_commands。
|
||||
"""
|
||||
return False
|
||||
|
||||
def stop(self) -> None:
|
||||
"""停止模块"""
|
||||
for client in self.get_instances().values():
|
||||
|
||||
Reference in New Issue
Block a user