diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-15 00:03:35 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-15 00:03:35 +0200 |
commit | 88425f87ecdc5e0d8e64a8e0ce44fea19daf4652 (patch) | |
tree | c81daa5711491f74d6b0a51767640132ee0a009d /api/src/routes/guilds/#guild_id | |
parent | :bug: fix sticker packs (diff) | |
download | server-88425f87ecdc5e0d8e64a8e0ce44fea19daf4652.tar.xz |
:art: reformat
Diffstat (limited to 'api/src/routes/guilds/#guild_id')
-rw-r--r-- | api/src/routes/guilds/#guild_id/emojis.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/api/src/routes/guilds/#guild_id/emojis.ts b/api/src/routes/guilds/#guild_id/emojis.ts index ff565cd4..85d7ac05 100644 --- a/api/src/routes/guilds/#guild_id/emojis.ts +++ b/api/src/routes/guilds/#guild_id/emojis.ts @@ -40,17 +40,14 @@ router.post("/", route({ body: "EmojiCreateSchema", permission: "MANAGE_EMOJIS_A const { guild_id } = req.params; const body = req.body as EmojiCreateSchema; + const id = Snowflake.generate(); const emoji_count = await Emoji.count({ guild_id: guild_id }); const { maxEmojis } = Config.get().limits.guild; if (emoji_count >= maxEmojis) throw DiscordApiErrors.MAXIMUM_NUMBER_OF_EMOJIS_REACHED.withParams(maxEmojis); - - const id = Snowflake.generate(); - if (body.require_colons == null) body.require_colons = true; const user = await User.findOneOrFail({ id: req.user_id }); - body.image = (await handleFile(`/emojis/${id}`, body.image)) as string; const emoji = await new Emoji({ |