Update edit_welcome_screen.ts

This commit is contained in:
ITOH
2021-04-24 19:37:45 +02:00
parent 033512951e
commit a1d0986edf
+2 -7
View File
@@ -2,20 +2,15 @@ import { rest } from "../../rest/rest.ts";
import { ModifyGuildWelcomeScreen } from "../../types/guilds/modify_guild_welcome_screen.ts";
import { WelcomeScreen } from "../../types/mod.ts";
import { endpoints } from "../../util/constants.ts";
import {
camelKeysToSnakeCase,
snakeKeysToCamelCase,
} from "../../util/utils.ts";
import { camelKeysToSnakeCase } from "../../util/utils.ts";
export async function editWelcomeScreen(
guildId: string,
options: ModifyGuildWelcomeScreen,
) {
const result = await rest.runMethod(
return await rest.runMethod<WelcomeScreen>(
"patch",
endpoints.GUILD_WELCOME_SCREEN(guildId),
camelKeysToSnakeCase(options),
);
return snakeKeysToCamelCase<WelcomeScreen>(result);
}