diff --git a/src/Bot.ts b/src/Bot.ts index be937a1..7f04a01 100644 --- a/src/Bot.ts +++ b/src/Bot.ts @@ -176,7 +176,7 @@ export class Bot extends EventEmitter { { command: cmdMsg?.command, user: m.member || undefined, - error: e, + error: e as Error, }, m ); @@ -222,7 +222,7 @@ export class Bot extends EventEmitter { { command: cmd?.command, user: (i.member as GuildMember) || undefined, - error: e, + error: e as Error, }, i as CommandInteraction ); @@ -234,7 +234,7 @@ export class Bot extends EventEmitter { return true; } catch (e) { console.log("❌"); - console.error(`[❌ ERROR] ${e.toString()}`); + console.error(`[❌ ERROR] ${e}`); return false; } } diff --git a/src/CommandManager.ts b/src/CommandManager.ts index 4728e9d..2fd10b3 100644 --- a/src/CommandManager.ts +++ b/src/CommandManager.ts @@ -98,7 +98,7 @@ export class CommandManager { this.list.push(command); return true; } catch (e) { - console.error(`[❌ ERROR] ${e.toString()}`); + console.error(`[❌ ERROR] ${e}`); return false; } }