fix(twitch): Pass context arguments correctly
This commit is contained in:
@@ -54,6 +54,7 @@ class TwitchCmdClient(ExecClient):
|
||||
alias=maybe_command,
|
||||
used_prefix=prefix,
|
||||
message=message,
|
||||
content=message.text,
|
||||
initial_globals={
|
||||
"author": CustomCmdUser(message.chatter),
|
||||
"channel": CustomCmdUser(message.broadcaster),
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ class CustomCmdComponent(cmds.Component):
|
||||
# Make sure the command parses (can't guarantee it runs, but at least it can parse)
|
||||
try:
|
||||
await self.cmdclient.run_command(
|
||||
ExecContext(args=[], content=""), response, dryrun=True
|
||||
ExecContext(alias="testing", args=[], content=""), response, dryrun=True
|
||||
)
|
||||
except Exception:
|
||||
# TODO: Nicer errors for pinpointing problem
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class CustomContext(ExecContext):
|
||||
used_prefix: str,
|
||||
**kwargs,
|
||||
):
|
||||
super().__init__(**kwargs)
|
||||
super().__init__(alias=alias, **kwargs)
|
||||
self.bot = bot
|
||||
self.message = message
|
||||
self.alias = alias
|
||||
|
||||
Reference in New Issue
Block a user