We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae7706 commit 1fa1188Copy full SHA for 1fa1188
interactions/utils/utils.py
@@ -78,13 +78,12 @@ async def deferring_func(
78
except RuntimeError as e:
79
raise RuntimeError("No running event loop detected!") from e
80
81
- if isinstance(args[0], (ComponentContext, CommandContext)):
+ if args and isinstance(args[0], (ComponentContext, CommandContext)):
82
self = ctx
83
args = list(args)
84
ctx = args.pop(0)
85
86
task: Task = loop.create_task(coro(self, ctx, *args, **kwargs))
87
-
88
else:
89
task: Task = loop.create_task(coro(ctx, *args, **kwargs))
90
0 commit comments