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