diff --git a/src/Bot.ts b/src/Bot.ts index 50fe467..7917b56 100644 --- a/src/Bot.ts +++ b/src/Bot.ts @@ -1,11 +1,7 @@ //IMPORTS import { Client, ClientOptions, Message } from "discord.js"; -import { - Command, - CommandManager, - CommandMessageStructure, - PermissionsError, -} from "./Command.js"; +import { Command, CommandManager, CommandMessageStructure } from "./Command.js"; +import { PermissionsError } from "./Error.js"; import { HelpMessage, HelpMessageParams } from "./Help.js"; import * as http from "http"; import { SystemMessageManager } from "./SystemMessage.js"; diff --git a/src/SystemMessage.ts b/src/SystemMessage.ts index ad80db6..503e331 100644 --- a/src/SystemMessage.ts +++ b/src/SystemMessage.ts @@ -8,7 +8,8 @@ import { TextChannel, User, } from "discord.js"; -import { Command, PermissionsError } from "./Command.js"; +import { Command } from "./Command.js"; +import { PermissionsError } from "./Error.js"; export type MessageType = "PERMISSION" | "ERROR" | "NOT_FOUND"; export interface SystemMessageAppearance { @@ -95,7 +96,7 @@ export class SystemMessageManager { if (data.error) { if ( data.error instanceof Error || - data.error instanceof PermissionsError + (data.error as any) instanceof PermissionsError ) { embed.addField( "Error details:",