From 160a9573239ae877cccf0912c0220fe9797924eb Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:31:48 +0200 Subject: [PATCH] Update create_emoji.ts --- src/helpers/emojis/create_emoji.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/helpers/emojis/create_emoji.ts b/src/helpers/emojis/create_emoji.ts index 5e4554ab8..2b55f7ec4 100644 --- a/src/helpers/emojis/create_emoji.ts +++ b/src/helpers/emojis/create_emoji.ts @@ -3,7 +3,7 @@ import { CreateGuildEmoji } from "../../types/emojis/create_guild_emoji.ts"; import { Emoji } from "../../types/emojis/emoji.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; -import { snakeKeysToCamelCase, urlToBase64 } from "../../util/utils.ts"; +import { urlToBase64 } from "../../util/utils.ts"; /** Create an emoji in the server. Emojis and animated emojis have a maximum file size of 256kb. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a JSON status code. If a URL is provided to the image parameter, Discordeno will automatically convert it to a base64 string internally. */ export async function createEmoji( @@ -18,11 +18,9 @@ export async function createEmoji( image = await urlToBase64(image); } - const result = await rest.runMethod("post", endpoints.GUILD_EMOJIS(guildId), { + return await rest.runMethod("post", endpoints.GUILD_EMOJIS(guildId), { ...options, name, image, }); - - return snakeKeysToCamelCase(result); }