Class BotMethods

Methods for interacting with bot specific endpoints

Hierarchy

  • BotMethods

Constructors

Methods

Properties

Constructors

  • Create a new Bot Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.bot.method, where client is an initialized SnowTransfer instance

    Parameters

    • requestHandler: RequestHandler

      request handler that calls the rest api

    Returns BotMethods

Methods

  • Get the gateway url to connect to

    Returns

    Gateway data

    Example

    const client = new SnowTransfer("TOKEN")
    const result = await client.bot.getGateway()
    // result should be something like { url: "wss://gateway.discord.gg" }

    Returns Promise<{
        url: string;
    }>

  • Get the gateway url to connect to and a recommended amount of shards to use

    Returns

    Gateway data

    Example

    const client = new SnowTransfer("TOKEN")
    const result = await client.bot.getGatewayBot()
    // result should be something like { url: "wss://gateway.discord.gg", shards: 1, session_start_limit: { total: 1000, remaining: 999, reset_after: 14400000, max_concurrency: 1 } }

    Returns Promise<{
        session_start_limit: SessionStartLimit;
        shards: number;
        url: string;
    }>

Properties

requestHandler: RequestHandler

Generated using TypeDoc