diff --git a/model/command/command.py b/model/command/command.py index b32f97fe9..9972e08de 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -64,6 +64,8 @@ class Command: result = await plugin.plugin_instance.run(ame) else: result = await asyncio.to_thread(plugin.plugin_instance.run, ame) + if not result: + continue if isinstance(result, CommandResult): hit = result.hit res = result._result_tuple() diff --git a/type/command.py b/type/command.py index 0504f947d..73ed3efe7 100644 --- a/type/command.py +++ b/type/command.py @@ -18,7 +18,7 @@ class CommandResult(): 用于在Command中返回多个值 ''' - def __init__(self, hit: bool, success: bool, message_chain: list, command_name: str = "unknown_command") -> None: + def __init__(self, hit: bool, success: bool = False, message_chain: list = [], command_name: str = "unknown_command") -> None: self.hit = hit self.success = success self.message_chain = message_chain