mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
Log error as error
This commit is contained in:
1 parent
e05c24596d
commit
5ab7ea3df3
1 file changed
+2
-2
@@ -127,14 +127,14 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// log error to console with full object depth
|
// log error to console with full object depth
|
||||||
console.dir(error, { depth: null });
|
console.dir(error, { depth: null });
|
||||||
console.log(
|
console.error(
|
||||||
`${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${
|
`${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${
|
||||||
interaction.guild.name
|
interaction.guild.name
|
||||||
} (#${
|
} (#${
|
||||||
interaction.guild.memberCount
|
interaction.guild.memberCount
|
||||||
})> Command '${interaction}' failed unexpectedly.`
|
})> Command '${interaction}' failed unexpectedly.`
|
||||||
);
|
);
|
||||||
console.log(`Interaction input:\n${interaction}`);
|
console.error(`Interaction input:\n${interaction}`);
|
||||||
|
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
Reference in new issue
Block a user