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);
}