types: fix new types issues (#829)

* feat: add tests for deleting channel overwrites

* fix: typings
This commit is contained in:
Skillz4Killz
2021-04-12 02:26:55 -04:00
committed by GitHub
parent b7a2b0ed55
commit 51e27d8f17
31 changed files with 329 additions and 273 deletions
+3 -1
View File
@@ -1,9 +1,11 @@
import { rest } from "../../rest/rest.ts";
import { DiscordGetGatewayBot, GetGatewayBot } from "../../types/gateway/get_gateway_bot.ts";
import { endpoints } from "../../util/constants.ts";
import { camelKeysToSnakeCase } from "../../util/utils.ts";
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
export async function getGatewayBot() {
const result = await rest.runMethod("get", endpoints.GATEWAY_BOT);
return result as DiscordBotGatewayData;
return camelKeysToSnakeCase(result as DiscordGetGatewayBot) as GetGatewayBot;
}