diff --git a/src/Bot.ts b/src/Bot.ts index 0f7ea8f..dbdeb0d 100644 --- a/src/Bot.ts +++ b/src/Bot.ts @@ -12,6 +12,15 @@ import { SystemMessageManager } from "./SystemMessage.js"; import { EventEmitter } from "events"; //TYPE DEFINITIONS +export declare interface Bot { + on(event: "ready", listener: Function): this; + on(event: "message", listener: (m: Message) => void): this; + on( + event: "command", + listener: (m: Message, cmdMsg: CommandMessageStructure) => void + ): this; + on(event: "error", listener: (e: any) => void): this; +} interface ConfigurationOptions { token?: string; helpCommand: boolean; diff --git a/src/Command.ts b/src/Command.ts index c7d300d..4f70cd0 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -34,7 +34,7 @@ interface PhraseOccurrenceData { type: "NAME" | "ALIAS"; } -//ERROR CLASSES +//CLASSES export class PermissionsError { private command: Command; private user: GuildMember | null; @@ -46,8 +46,6 @@ export class PermissionsError { return `User ${this.user?.user.tag} doesn't have enough permissions to run "${this.command.name}" command`; } } - -//CLASSES export class Command { name: string; aliases: string[];