Add support for message commands in client

This commit is contained in:
Zeva Rose 2022-04-19 16:56:58 -06:00
parent b5242aabbe
commit 03d08dd16c

View file

@ -79,9 +79,9 @@ class Jarvis(Snake):
if update["domain"] in self.phishing_domains:
self.phishing_domains.remove(update["domain"])
async def _prerun(self, ctx: InteractionContext, *args, **kwargs) -> None:
async def _prerun(self, ctx: Context, *args, **kwargs) -> None:
name = ctx.invoked_name
if ctx.target_id:
if isinstance(ctx, InteractionContext) and ctx.target_id:
kwargs["context target"] = ctx.target
args = " ".join(f"{k}:{v}" for k, v in kwargs.items())
self.logger.debug(f"Running command `{name}` with args: {args or 'None'}")