Skip to content

Commit

Permalink
add datetime and command/message used in error messages to core
Browse files Browse the repository at this point in the history
  • Loading branch information
VINXIS committed Oct 3, 2024
1 parent 05301a8 commit 08339af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DiscordBot/functions/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async function errorHandler (err: unknown, m?: Message | ChatInpu
console.error(err);
const channel = discordClient.channels.cache.get(config.discord.coreChannel);
if (channel instanceof TextChannel)
await channel.send(`An error occurred while executing a command\n\`\`\`${err}\`\`\``);
await channel.send(`${new Date().toISOString()}\nAn error occurred while executing a command\nMessage/Interaction: \`${m instanceof Message ? m.content : m.commandName}\`\n\`\`\`${err}\`\`\``);
await respond(m, "The command was unable to be fulfilled.\nAn error unrelated to discord occurred while executing this command. Contact VINXIS");
return true;
}

0 comments on commit 08339af

Please sign in to comment.