diff --git a/morpheus/exts/command.py b/morpheus/exts/command.py index 096ce2f..31e1d35 100644 --- a/morpheus/exts/command.py +++ b/morpheus/exts/command.py @@ -70,7 +70,7 @@ class Command: args = [] kwargs = {} if args_list: - params = self.parser.parse_args(args_list) + params, ctx.extra_params = self.parser.parse_known_args(args_list) for key, value in iterator: value: inspect.Parameter diff --git a/morpheus/exts/context.py b/morpheus/exts/context.py index e999d66..4e8f8ae 100644 --- a/morpheus/exts/context.py +++ b/morpheus/exts/context.py @@ -14,6 +14,7 @@ class Context: self.content: ContentBase = content self.called_with: str = called_with self.body: str = body + self.extra_params: list = [] async def send_text(self, body: str, formatted_body: str = None, format_type: str = 'org.matrix.custom.html'): await self.client.send_text(self.room, body, formatted_body, format_type)