Log error as error

This commit is contained in:
Marius Begby committed 2023-07-08 17:13:06 +02:00
1 parent e05c24596d
commit 5ab7ea3df3
1 file changed
+2 -2
+2 -2
View File
@@ -127,14 +127,14 @@ client.on('interactionCreate', async (interaction) => {
} catch (error) {
// log error to console with full object depth
console.dir(error, { depth: null });
console.log(
console.error(
`${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${
interaction.guild.name
} (#${
interaction.guild.memberCount
})> Command '${interaction}' failed unexpectedly.`
);
console.log(`Interaction input:\n${interaction}`);
console.error(`Interaction input:\n${interaction}`);
await interaction.editReply({
embeds: [