Skip to content

Commit

Permalink
literally forgot to add this part
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 11, 2023
1 parent 91201e6 commit 07b0d49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/functions/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function errorHandler(client: Client, error: any, type: string) {

let eprotoError = false;
let description = error.stack;
let codeBlocks = " ";
let codeBlocks = "";

if (error.isAxiosError) {
// axios errors are JSON
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export async function devLogger(client: Client, description: string, params: Log
const channel = client.channels.cache.get(client.tokens.errorChannel) as TextChannel;
if (!channel) return; // avoid infinite loop when crash is outside of client

if (params.codeBlocks !== null && params.codeBlocks !== undefined)
description = `\`\`\`${params.codeBlocks}\n${description}\`\`\``;

const embed = new EmbedBuilder()
.setTitle(params.title ?? "Unhandled Rejection")
.setDescription(description)
Expand Down

0 comments on commit 07b0d49

Please sign in to comment.