Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApplicationCommandManager

Manages API methods for Users

Hierarchy

Index

Constructors

Properties

client: Client

The Client that instantiated this Manager

guild: undefined | Guild

The guild that instantiated this Manager

Accessors

Methods

  • Creates an application command

    example
    client.commands.create({ name: 'ping', description: 'Shows the bot\'s ping' });
    
    example
    guild.commands.create({ name: 'serverinfo', description: 'Shows information about the server' });
    
    example
    client.commands.create({ name: 'serverinfo', description: 'Shows information about the server' }, guild);
    

    Parameters

    Returns Promise<ApplicationCommand>

  • delete(id: string): Promise<undefined>
  • Deletes an application command

    Parameters

    • id: string

    Returns Promise<undefined>

  • Edits an application command

    example
    client.commands.edit('123456789123456', { name: 'ping', description: 'Shows the bot\'s ping' });
    
    example
    guild.commands.create('123456789123456', { name: 'serverinfo', description: 'Shows information about the server' });
    
    example
    guild.commands.create('123456789123456', { name: 'serverinfo', description: 'Shows information about the server' }, guild);
    

    Parameters

    • id: string

      The id of the command to edit

    • data: Partial<ApplicationCommand>

      The data to edit the command with

    • guild: undefined | Guild = ...

      The Guild to edit the command in

    Returns Promise<ApplicationCommand>

  • Obtains one or multiple application commands from Discord

    Parameters

    • id: string

    Returns Promise<ApplicationCommand>

  • Parameters

    • Optional id: string

    Returns Promise<Collection<string, ApplicationCommand>>

Generated using TypeDoc version 0.22.16, the 9/16/2022 at 1:09:15 AM