This is the command context interface!

interface CommandContext {
    addComponentEvent: ((comp: any, runComponentFunc: compFunc) => any);
    addModalEvent: ((mod: any, runModalFunc: modalFunc) => any);
    channel: null | TextBasedChannel;
    command: null | ApplicationCommand<{}>;
    guild: null | Guild;
    handler: Handler;
    interaction: CommandInteraction<CacheType>;
    options: any;
    user: User;
}

Hierarchy (view full)

Properties

addComponentEvent: ((comp: any, runComponentFunc: compFunc) => any)

This function adds a component event!

Type declaration

    • (comp, runComponentFunc): any
    • Parameters

      • comp: any
      • runComponentFunc: compFunc

      Returns any

addModalEvent: ((mod: any, runModalFunc: modalFunc) => any)

This function adds a modal event!

Type declaration

    • (mod, runModalFunc): any
    • Parameters

      • mod: any
      • runModalFunc: modalFunc

      Returns any

channel: null | TextBasedChannel

This is the channel where the event was executed!

command: null | ApplicationCommand<{}>

This is the command!

guild: null | Guild

This is the guild of the event!

handler: Handler

This is the main handler!

interaction: CommandInteraction<CacheType>

This is the command interaction!

options: any

They are the options of the command!

user: User

This is the user who executed the event!