Fix target_id check in logs
This commit is contained in:
parent
87e3b18a77
commit
989d8daff8
1 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ class Jarvis(Snake):
|
||||||
|
|
||||||
async def _prerun(self, ctx: InteractionContext, *args, **kwargs) -> None:
|
async def _prerun(self, ctx: InteractionContext, *args, **kwargs) -> None:
|
||||||
name = ctx.invoked_name
|
name = ctx.invoked_name
|
||||||
if ctx.target:
|
if ctx.target_id:
|
||||||
kwargs["context target"] = ctx.target
|
kwargs["context target"] = ctx.target
|
||||||
args = " ".join(f"{k}:{v}" for k, v in kwargs.items())
|
args = " ".join(f"{k}:{v}" for k, v in kwargs.items())
|
||||||
self.logger.debug(f"Running command `{name}` with args: {args or 'None'}")
|
self.logger.debug(f"Running command `{name}` with args: {args or 'None'}")
|
||||||
|
@ -117,7 +117,7 @@ class Jarvis(Snake):
|
||||||
timestamp = int(datetime.now().timestamp())
|
timestamp = int(datetime.now().timestamp())
|
||||||
timestamp = f"<t:{timestamp}:T>"
|
timestamp = f"<t:{timestamp}:T>"
|
||||||
arg_str = ""
|
arg_str = ""
|
||||||
if ctx.target:
|
if ctx.target_id:
|
||||||
ctx.kwargs["context target"] = ctx.target
|
ctx.kwargs["context target"] = ctx.target
|
||||||
for k, v in ctx.kwargs.items():
|
for k, v in ctx.kwargs.items():
|
||||||
arg_str += f" {k}: "
|
arg_str += f" {k}: "
|
||||||
|
@ -164,7 +164,7 @@ class Jarvis(Snake):
|
||||||
if modlog:
|
if modlog:
|
||||||
channel = await ctx.guild.fetch_channel(modlog.value)
|
channel = await ctx.guild.fetch_channel(modlog.value)
|
||||||
args = []
|
args = []
|
||||||
if ctx.target:
|
if ctx.target_id:
|
||||||
args.append(f"{KEY_FMT}context target:{VAL_FMT}{ctx.target}{RESET}")
|
args.append(f"{KEY_FMT}context target:{VAL_FMT}{ctx.target}{RESET}")
|
||||||
for k, v in ctx.kwargs.items():
|
for k, v in ctx.kwargs.items():
|
||||||
if isinstance(v, str):
|
if isinstance(v, str):
|
||||||
|
|
Loading…
Add table
Reference in a new issue