Gateway
Get Gateway
GetAPIGateway
Returns an object with a valid WSS URL which the app can use when Connecting to the Gateway. Apps should cache this value and only call this endpoint to retrieve a new URL when they are unable to properly establish a connection using the cached one.
import { getGateway } from "dressed";
const gateway = await getGateway();Info
This endpoint does not require authentication.
Get Gateway Bot
GetAPIGatewayBot
Returns an object based on the information in Get Gateway, plus additional metadata that can help during the operation of large or sharded bots. Unlike the Get Gateway, this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds.
import { getGatewayBot } from "dressed";
const gatewayBot = await getGatewayBot();Warning
This endpoint requires authentication using a valid bot token.