diff --git a/astrbot/builtin_stars/builtin_commands/commands/__init__.py b/astrbot/builtin_stars/builtin_commands/commands/__init__.py index 8f1f9bafa..46d255965 100644 --- a/astrbot/builtin_stars/builtin_commands/commands/__init__.py +++ b/astrbot/builtin_stars/builtin_commands/commands/__init__.py @@ -11,7 +11,6 @@ from .provider import ProviderCommands from .setunset import SetUnsetCommands from .sid import SIDCommand from .t2i import T2ICommand -from .tool import ToolCommands from .tts import TTSCommand __all__ = [ @@ -27,5 +26,4 @@ __all__ = [ "SetUnsetCommands", "T2ICommand", "TTSCommand", - "ToolCommands", ] diff --git a/astrbot/builtin_stars/builtin_commands/commands/tool.py b/astrbot/builtin_stars/builtin_commands/commands/tool.py deleted file mode 100644 index 9a6c507e6..000000000 --- a/astrbot/builtin_stars/builtin_commands/commands/tool.py +++ /dev/null @@ -1,31 +0,0 @@ -from astrbot.api import star -from astrbot.api.event import AstrMessageEvent, MessageEventResult - - -class ToolCommands: - def __init__(self, context: star.Context): - self.context = context - - async def tool_ls(self, event: AstrMessageEvent): - """查看函数工具列表""" - event.set_result( - MessageEventResult().message("tool 指令在 AstrBot v4.0.0 已经被移除。"), - ) - - async def tool_on(self, event: AstrMessageEvent, tool_name: str = ""): - """启用一个函数工具""" - event.set_result( - MessageEventResult().message("tool 指令在 AstrBot v4.0.0 已经被移除。"), - ) - - async def tool_off(self, event: AstrMessageEvent, tool_name: str = ""): - """停用一个函数工具""" - event.set_result( - MessageEventResult().message("tool 指令在 AstrBot v4.0.0 已经被移除。"), - ) - - async def tool_all_off(self, event: AstrMessageEvent): - """停用所有函数工具""" - event.set_result( - MessageEventResult().message("tool 指令在 AstrBot v4.0.0 已经被移除。"), - ) diff --git a/astrbot/builtin_stars/builtin_commands/main.py b/astrbot/builtin_stars/builtin_commands/main.py index 7809c4359..207a14b4a 100644 --- a/astrbot/builtin_stars/builtin_commands/main.py +++ b/astrbot/builtin_stars/builtin_commands/main.py @@ -13,7 +13,6 @@ from .commands import ( SetUnsetCommands, SIDCommand, T2ICommand, - ToolCommands, TTSCommand, ) @@ -24,7 +23,6 @@ class Main(star.Star): self.help_c = HelpCommand(self.context) self.llm_c = LLMCommands(self.context) - self.tool_c = ToolCommands(self.context) self.plugin_c = PluginCommands(self.context) self.admin_c = AdminCommands(self.context) self.conversation_c = ConversationCommands(self.context) @@ -47,30 +45,6 @@ class Main(star.Star): """开启/关闭 LLM""" await self.llm_c.llm(event) - @filter.command_group("tool") - def tool(self): - """函数工具管理""" - - @tool.command("ls") - async def tool_ls(self, event: AstrMessageEvent): - """查看函数工具列表""" - await self.tool_c.tool_ls(event) - - @tool.command("on") - async def tool_on(self, event: AstrMessageEvent, tool_name: str): - """启用一个函数工具""" - await self.tool_c.tool_on(event, tool_name) - - @tool.command("off") - async def tool_off(self, event: AstrMessageEvent, tool_name: str): - """停用一个函数工具""" - await self.tool_c.tool_off(event, tool_name) - - @tool.command("off_all") - async def tool_all_off(self, event: AstrMessageEvent): - """停用所有函数工具""" - await self.tool_c.tool_all_off(event) - @filter.command_group("plugin") def plugin(self): """插件管理"""