From 726ac09ae1fdd32b034db41c7073cb5f13956a45 Mon Sep 17 00:00:00 2001 From: Skillz Date: Tue, 14 Jul 2020 14:58:21 -0400 Subject: [PATCH] add emojiURL function helper --- handlers/guild.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/handlers/guild.ts b/handlers/guild.ts index 72a26b7be..183442e1c 100644 --- a/handlers/guild.ts +++ b/handlers/guild.ts @@ -203,6 +203,11 @@ export function deleteEmoji(guildID: string, id: string, reason?: string) { ); } +/** Creates a url to the emoji from the Discord CDN. */ +export function emojiURL(id: string, animated = false) { + return `https://cdn.discordapp.com/emojis/${id}.${animated ? 'gif' : 'jpg'}` +} + /** Create a new role for the guild. Requires the MANAGE_ROLES permission. */ export async function createGuildRole( guild: Guild,