more readable logs

This commit is contained in:
Jonny_Bro (Nikita) 2024-07-09 21:50:35 +05:00
parent 8b677f9ec4
commit 6ad65e7019
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -58,13 +58,13 @@ class CommandHandler extends BaseEvent {
} }
client.logger.cmd( client.logger.cmd(
`User ${interaction.user.getUsername()} used ${command.command.name} in ${interaction.guild ? interaction.guild.name : "DM"} with arguments: ${ `[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${
interaction.options.data.length > 0 interaction.options.data.length > 0
? interaction.options.data ? ", args: " + interaction.options.data
.map(arg => { .map(arg => {
return `${arg.name}: ${arg.value}`; return `${arg.name}: ${arg.value}`;
}).join(", ") }).join(", ")
: "no args" : ""
}`, }`,
); );