Files
discordeno/plugins/bot/helpers/misc/getGatewayBot.ts
Skillz4Killz ffe7cdbc6f feat: base plugin lib idea (#2308)
* feat: base plugin lib idea

* fix: stuff

* fmt

* fix: imports and exports

* fix: errors & tests

* fix: remove logs
2022-06-18 18:46:37 -04:00

10 lines
404 B
TypeScript

import { Bot } from "../../bot.ts";
import { DiscordGetGatewayBot } from "../../deps.ts";
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
export async function getGatewayBot(bot: Bot) {
const result = await bot.rest.runMethod<DiscordGetGatewayBot>(bot.rest, "GET", bot.constants.routes.GATEWAY_BOT());
return bot.transformers.gatewayBot(result);
}