Files
discordeno/helpers/emojis/getEmojiUrl.ts
T
Skillz4Killz 3a5bdce32d feat: helpers support strings in args (#2478)
* fix: helpers support strings in args

* fix: fmt
2022-09-15 20:59:02 -05:00

14 lines
472 B
TypeScript

import { Bot } from "../../bot.ts";
import { BigString } from "../../types/shared.ts";
/**
* Builds a URL to an emoji in the Discord CDN.
*
* @param emojiId - The ID of the emoji to access.
* @param animated - Whether the emoji is animated or static.
* @returns The link to the resource.
*/
export function getEmojiURL(_bot: Bot, emojiId: BigString, animated = false): string {
return `https://cdn.discordapp.com/emojis/${emojiId}.${animated ? "gif" : "png"}`;
}