diff --git a/src/execution.ts b/src/execution.ts index f6ff0c1..038f32e 100644 --- a/src/execution.ts +++ b/src/execution.ts @@ -286,12 +286,19 @@ async function executeFromQueue(channel: string) { console.error(`Error ocurred while handling chat completion request (${(e as object).constructor.name}):`); console.error(e); + let errorText = "\n"; + + if (e instanceof Error) { + errorText += e.message; + } + else errorText = ""; + requestReply( message, { embeds: [{ color: 0xff0000, - description: "Something bad happened! :frowning:" + description: "Something bad happened! :frowning:" + errorText }], }, {allowedMentions: { repliedUser: false } },