From 2f389a2744432692cfdf31a81aac540e3219a9cf Mon Sep 17 00:00:00 2001 From: yzhh <2596322644@qq.com> Date: Tue, 23 Aug 2022 12:53:34 +0800 Subject: [PATCH] Update command.py --- core/parser/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/parser/command.py b/core/parser/command.py index 97d4819f..bc38950f 100644 --- a/core/parser/command.py +++ b/core/parser/command.py @@ -14,6 +14,7 @@ class CommandParser: def __init__(self, args: Command, command_prefixes: list, bind_prefix=None, msg: MessageSession = None): + args = copy.deepcopy(args) self.command_prefixes = command_prefixes self.bind_prefix = bind_prefix self.origin_template = args @@ -29,7 +30,7 @@ class CommandParser: if match.options_desc is not None: for m in match.options_desc: self.options_desc.append(f'{m} {match.options_desc[m]}') - self.args: Dict[Union[Template, ''], dict] = copy.deepcopy(help_docs) + self.args: Dict[Union[Template, ''], dict] = help_docs def return_formatted_help_doc(self) -> str: if not self.args: