From 08339afdf130bdce148c725d9d5657326bb8e56b Mon Sep 17 00:00:00 2001 From: VINXIS Date: Thu, 3 Oct 2024 11:28:23 -0600 Subject: [PATCH] add datetime and command/message used in error messages to core --- DiscordBot/functions/error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscordBot/functions/error.ts b/DiscordBot/functions/error.ts index 310e52182f..d334f4002b 100644 --- a/DiscordBot/functions/error.ts +++ b/DiscordBot/functions/error.ts @@ -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; } \ No newline at end of file