Fix bug when commands with no params are given a param

master
DustyP 6 years ago
parent 2abee4572d
commit a150bdd027

@ -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

@ -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)

Loading…
Cancel
Save