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")) {
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 {
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 {
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)}`,

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."
}, reference));
} 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 {
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>"

View File

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