A client for interacting with Discord's API and handling interactions

Hierarchy

  • DefaultRestAdapter
    • Client

Constructors

Methods

  • Registers a slash command

    Example

    client.addCommand(new SlashCommandBuilder()
    .name('ping')
    .description('Pong!')
    .handler((inter) => {
    return {
    type: 4,
    data: {
    content: 'Pong!',
    },
    };
    }),
    );

    Parameters

    Returns void

  • Deploys all commands to Discord. Will delete any commands that are not registered

    Async

    Example

    await client.deployCommands();
    

    Returns Promise<void>

  • Processes an interaction

    Example

    client.processInteraction(interaction);
    

    Parameters

    Returns Promise<APIInteractionResponse>

Generated using TypeDoc