mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(StickerPack): Nullify bannerId (#7119)
This commit is contained in:
@@ -50,9 +50,9 @@ class StickerPack extends Base {
|
||||
|
||||
/**
|
||||
* The id of the sticker pack's banner image
|
||||
* @type {Snowflake}
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.bannerId = pack.banner_asset_id;
|
||||
this.bannerId = pack.banner_asset_id ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,10 +85,10 @@ class StickerPack extends Base {
|
||||
/**
|
||||
* The URL to this sticker pack's banner.
|
||||
* @param {StaticImageURLOptions} [options={}] Options for the Image URL
|
||||
* @returns {string}
|
||||
* @returns {?string}
|
||||
*/
|
||||
bannerURL({ format, size } = {}) {
|
||||
return this.client.rest.cdn.StickerPackBanner(this.bannerId, format, size);
|
||||
return this.bannerId && this.client.rest.cdn.StickerPackBanner(this.bannerId, format, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user