add: getWelcomeScreen

This commit is contained in:
ITOH
2021-04-14 09:53:37 +02:00
parent 02e1495988
commit 9d4306ff39
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import { rest } from "../../rest/rest.ts";
import { WelcomeScreen } from "../../types/mod.ts";
import { endpoints } from "../../util/constants.ts";
import { snakeKeysToCamelCase } from "../../util/utils.ts";
export async function getWelcomeScreen(guildId: string) {
const result = await rest.runMethod(
"get",
endpoints.GUILD_WELCOME_SCREEN(guildId),
);
return snakeKeysToCamelCase<WelcomeScreen>(result);
}
+3
View File
@@ -41,6 +41,7 @@ import { getGuildPreview } from "./guilds/get_guild_preview.ts";
import { getPruneCount } from "./guilds/get_prune_count.ts"; import { getPruneCount } from "./guilds/get_prune_count.ts";
import { getVanityURL } from "./guilds/get_vainty_url.ts"; import { getVanityURL } from "./guilds/get_vainty_url.ts";
import { getVoiceRegions } from "./guilds/get_voice_regions.ts"; import { getVoiceRegions } from "./guilds/get_voice_regions.ts";
import { getWelcomeScreen } from "./guilds/get_welcome_screen.ts";
import { getWidget } from "./guilds/get_widget.ts"; import { getWidget } from "./guilds/get_widget.ts";
import { getWidgetImageURL } from "./guilds/get_widget_image_url.ts"; import { getWidgetImageURL } from "./guilds/get_widget_image_url.ts";
import { getWidgetSettings } from "./guilds/get_widget_settings.ts"; import { getWidgetSettings } from "./guilds/get_widget_settings.ts";
@@ -203,6 +204,7 @@ export {
getWebhook, getWebhook,
getWebhooks, getWebhooks,
getWebhookWithToken, getWebhookWithToken,
getWelcomeScreen,
getWidget, getWidget,
getWidgetImageURL, getWidgetImageURL,
getWidgetSettings, getWidgetSettings,
@@ -282,6 +284,7 @@ export let helpers = {
getBans, getBans,
getGuildPreview, getGuildPreview,
getGuild, getGuild,
getWelcomeScreen,
getPruneCount, getPruneCount,
getVanityURL, getVanityURL,
getVoiceRegions, getVoiceRegions,