fix(twitch): Pass context arguments correctly

This commit is contained in:
2026-05-31 06:49:38 +10:00
parent 1c1c109860
commit 17c0dc00c1
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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