Log command params

This commit is contained in:
Marius Begby committed 2023-07-08 15:06:55 +02:00
1 parent c91a7174c8
commit 9127ce10d6
1 file changed
+6 -6
+6 -6
View File
@@ -118,9 +118,9 @@ client.on('interactionCreate', async (interaction) => {
console.log( console.log(
`${new Date().toISOString().substring(11, 19)}: Info: ${ `${new Date().toISOString().substring(11, 19)}: Info: ${
interaction.guild.name interaction.guild.name
} (#${interaction.guild.memberCount})> Command '/${ } (#${
interaction.commandName interaction.guild.memberCount
}' executed in ${executionTime} ms.` })> Command '${interaction}' executed in ${executionTime} ms.`
); );
} catch (error) { } catch (error) {
// log error to console with full object depth // log error to console with full object depth
@@ -128,9 +128,9 @@ client.on('interactionCreate', async (interaction) => {
console.log( console.log(
`${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${ `${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${
interaction.guild.name interaction.guild.name
} (#${interaction.guild.memberCount})> Command '/${ } (#${
interaction.commandName interaction.guild.memberCount
}' failed unexpectedly.` })> Command '${interaction}' failed unexpectedly.`
); );
console.log(`Interaction input:\n${interaction}`); console.log(`Interaction input:\n${interaction}`);