Compare commits
2 Commits
9cb259f2c7
...
89de330e2d
| Author | SHA1 | Date | |
|---|---|---|---|
| 89de330e2d | |||
| cd54036ab7 |
@@ -116,6 +116,9 @@ async def handle_command(command: str, message: str,
|
|||||||
if plugin:
|
if plugin:
|
||||||
logger.Log("Info", f"已找到插件注册指令: {command}, class: {plugin.__class__.__name__}")
|
logger.Log("Info", f"已找到插件注册指令: {command}, class: {plugin.__class__.__name__}")
|
||||||
return await plugin.callback(message, chat_id, user_id)
|
return await plugin.callback(message, chat_id, user_id)
|
||||||
|
elif "default" in PluginInterface.plugin_instances:
|
||||||
|
logger.Log("Info", f"未找到插件注册指令: {command}, 使用默认插件: {PluginInterface.plugin_instances["default"].__class__.__name__}")
|
||||||
|
return await PluginInterface.plugin_instances["default"].callback(command+" "+message, chat_id, user_id)
|
||||||
else:
|
else:
|
||||||
return f"❌ 未识别指令: {command}"
|
return f"❌ 未识别指令: {command}"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user