Skip to content

Commit 20f7afe

Browse files
authored
Restore ctx.args and ctx.kwargs (#269)
1 parent 10f50f2 commit 20f7afe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord_slash/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,9 @@ async def invoke_command(self, func, ctx, args):
12021202
:param args: Args. Can be list or dict.
12031203
"""
12041204
try:
1205+
if isinstance(args, dict):
1206+
ctx.kwargs = args
1207+
ctx.args = list(args.values())
12051208
await func.invoke(ctx, **args)
12061209
except Exception as ex:
12071210
if not await self._handle_invoke_error(func, ctx, ex):

0 commit comments

Comments
 (0)