Better error logging, update playing messages

This commit is contained in:
Essem 2022-06-28 08:16:57 -05:00
parent d98f989fde
commit 8536c4b968
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
3 changed files with 9 additions and 3 deletions

View file

@ -94,7 +94,7 @@ export default async (client, cluster, worker, ipc, interaction) => {
} else if (error.toString().includes("Timed out")) { } else if (error.toString().includes("Timed out")) {
await interaction[interaction.acknowledged ? "editOriginalMessage" : "createMessage"]("The request timed out before I could download that image. Try uploading your image somewhere else or reducing its size."); await interaction[interaction.acknowledged ? "editOriginalMessage" : "createMessage"]("The request timed out before I could download that image. Try uploading your image somewhere else or reducing its size.");
} else { } else {
logger.error(`Error occurred with slash command ${command} with arguments ${JSON.stringify(interaction.data.options)}: ${JSON.stringify(error)}`); logger.error(`Error occurred with slash command ${command} with arguments ${JSON.stringify(interaction.data.options)}: ${typeof error === "object" ? JSON.stringify(error) : error.toString()}`);
try { try {
await interaction[interaction.acknowledged ? "editOriginalMessage" : "createMessage"]("Uh oh! I ran into an error while running this command. Please report the content of the attached file at the following link or on the esmBot Support server: <https://github.com/esmBot/esmBot/issues>", { await interaction[interaction.acknowledged ? "editOriginalMessage" : "createMessage"]("Uh oh! I ran into an error while running this command. Please report the content of the attached file at the following link or on the esmBot Support server: <https://github.com/esmBot/esmBot/issues>", {
file: `Message: ${await clean(error)}\n\nStack Trace: ${await clean(error.stack)}`, file: `Message: ${await clean(error)}\n\nStack Trace: ${await clean(error.stack)}`,

View file

@ -189,7 +189,7 @@ export default async (client, cluster, worker, ipc, message) => {
content: "The request timed out before I could download that image. Try uploading your image somewhere else or reducing its size." content: "The request timed out before I could download that image. Try uploading your image somewhere else or reducing its size."
}, reference)); }, reference));
} else { } else {
_error(`Error occurred with command message ${message.cleanContent}: ${error.toString()}`); _error(`Error occurred with command message ${message.cleanContent}: ${typeof error === "object" ? JSON.stringify(error) : error.toString()}`);
try { try {
await client.createMessage(message.channel.id, Object.assign({ await client.createMessage(message.channel.id, Object.assign({
content: "Uh oh! I ran into an error while running this command. Please report the content of the attached file at the following link or on the esmBot Support server: <https://github.com/esmBot/esmBot/issues>" content: "Uh oh! I ran into an error while running this command. Please report the content of the attached file at the following link or on the esmBot Support server: <https://github.com/esmBot/esmBot/issues>"

View file

@ -95,7 +95,7 @@
"with GIFs", "with GIFs",
"check out more stuff at projectlounge.pw", "check out more stuff at projectlounge.pw",
"the", "the",
"sissy hypnosis", "you just lost the game",
"Yandere Simulator", "Yandere Simulator",
"PogChamp", "PogChamp",
"yourself", "yourself",
@ -153,6 +153,12 @@
"Minecraft Alpha 1.0.16.05", "Minecraft Alpha 1.0.16.05",
"dame da ne", "dame da ne",
"Fall Guys", "Fall Guys",
"with a box of wind",
"The Incredibles",
"AVIF",
"Sega Nomad",
"Item Asylum",
"TIC-80",
"The clock is ticking." "The clock is ticking."
] ]
} }