UNPKG

advanced-command-handler

Version:

A package to help you create a bot with only 1 main file, directories for your events/commands, with some helpers classes and functions.

41 lines (40 loc) 2.3 kB
import { CommandHandler } from '../../CommandHandler'; import { Event } from '../Event'; /** * Creates a new EventContext. */ interface EventContextBuilder<E extends Event> { /** * The event related to the EventContext. */ event: E; /** * The CommandHandler. */ handler: typeof CommandHandler; } export declare class EventContext<E extends Event> implements EventContextBuilder<E> { /** * The event related to this EventContext. */ event: E; /** * The CommandHandler. */ handler: typeof CommandHandler; /** * Creates a new EventContext associated to an Event. * * @param options - The options of the EventContext. */ constructor(options: EventContextBuilder<E>); /** * Returns the Client. */ get client(): import("..").AdvancedClient; /** * Returns the name of the event associated to this EventContext. */ get eventName(): "message" | "error" | "warn" | "debug" | "applicationCommandCreate" | "applicationCommandDelete" | "applicationCommandUpdate" | "channelCreate" | "channelDelete" | "channelPinsUpdate" | "channelUpdate" | "emojiCreate" | "emojiDelete" | "emojiUpdate" | "guildBanAdd" | "guildBanRemove" | "guildCreate" | "guildDelete" | "guildUnavailable" | "guildIntegrationsUpdate" | "guildMemberAdd" | "guildMemberAvailable" | "guildMemberRemove" | "guildMembersChunk" | "guildMemberUpdate" | "guildUpdate" | "inviteCreate" | "inviteDelete" | "messageCreate" | "messageDelete" | "messageReactionRemoveAll" | "messageReactionRemoveEmoji" | "messageDeleteBulk" | "messageReactionAdd" | "messageReactionRemove" | "messageUpdate" | "presenceUpdate" | "rateLimit" | "invalidRequestWarning" | "ready" | "invalidated" | "roleCreate" | "roleDelete" | "roleUpdate" | "threadCreate" | "threadDelete" | "threadListSync" | "threadMemberUpdate" | "threadMembersUpdate" | "threadUpdate" | "typingStart" | "userUpdate" | "voiceStateUpdate" | "webhookUpdate" | "interaction" | "interactionCreate" | "shardDisconnect" | "shardError" | "shardReady" | "shardReconnecting" | "shardResume" | "stageInstanceCreate" | "stageInstanceUpdate" | "stageInstanceDelete" | "stickerCreate" | "stickerDelete" | "stickerUpdate"; } export {};