1.完成战斗/冒险系统2.新增help类

This commit is contained in:
2025-11-10 16:34:58 +08:00
parent fefb44d8f6
commit 168d561425
6 changed files with 159 additions and 79 deletions

View File

@@ -210,4 +210,28 @@ class WPSAPI(BasicWPSInterface):
self.register_plugin("say")
self.register_plugin("")
class WPSAPIHelp(WPSAPI):
@override
def dependencies(self) -> List[Type]:
return [WPSAPI]
@override
def is_enable_plugin(self) -> bool:
return True
@override
async def callback(self, message: str, chat_id: int, user_id: int) -> str|None:
return await self.send_markdown_message(f"""# 指令帮助
{"\n".join([f"- {key} 插件来源: {PluginInterface.plugin_instances.get(key).__class__.__name__}" for key in PluginInterface.plugin_instances.keys()])}
""",
chat_id,
user_id
)
@override
def wake_up(self) -> None:
logger.Log("Info", f"{ConsoleFrontColor.GREEN}WPSAPIHelp 插件已加载{ConsoleFrontColor.RESET}")
self.register_plugin("help")
self.register_plugin("帮助")
logger.SaveProperties()