Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GuildApplicationCommandManager

Manages API methods for ApplicationCommands

Hierarchy

Index

Constructors

Properties

client: Client

The Client that instantiated this Manager

guild: undefined | Guild

The guild that instantiated this Manager

Accessors

  • The cached commands for this Manager

    Returns Collection<string, ApplicationCommand>

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>

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