mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
refactor(Emoji)!: make imageURL() change extension dynamically (#10613)
BREAKING CHANGE: Image URLs of emojis now automatically return GIF or static extensions. BREAKING CHANGE: `CDN#emoji()` now has an `animated` required parameter.
This commit is contained in:
@@ -161,10 +161,11 @@ export class CDN {
|
||||
* Generates an emoji's URL.
|
||||
*
|
||||
* @param emojiId - The emoji id
|
||||
* @param animated - Whether the emoji is animated
|
||||
* @param options - Optional options for the emoji
|
||||
*/
|
||||
public emoji(emojiId: string, options?: Readonly<BaseImageURLOptions>): string {
|
||||
return this.makeURL(`/emojis/${emojiId}`, options);
|
||||
public emoji(emojiId: string, animated: boolean, options?: Readonly<ImageURLOptions>): string {
|
||||
return this.dynamicMakeURL(`/emojis/${emojiId}`, animated ? 'a_' : '', options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user