* Represents a Sticker. * @extends {Base}
| 11 | * @extends {Base} |
| 12 | */ |
| 13 | class Sticker extends Base { |
| 14 | constructor(client, sticker) { |
| 15 | super(client); |
| 16 | |
| 17 | this._patch(sticker); |
| 18 | } |
| 19 | |
| 20 | _patch(sticker) { |
| 21 | /** |
| 22 | * The sticker's id |
| 23 | * @type {Snowflake} |
| 24 | */ |
| 25 | this.id = sticker.id; |
| 26 | |
| 27 | if ('description' in sticker) { |
| 28 | /** |
| 29 | * The description of the sticker |
| 30 | * @type {?string} |
| 31 | */ |
| 32 | this.description = sticker.description; |
| 33 | } else { |
| 34 | this.description ??= null; |
| 35 | } |
| 36 | |
| 37 | if ('type' in sticker) { |
| 38 | /** |
| 39 | * The type of the sticker |
| 40 | * @type {?StickerType} |
| 41 | */ |
| 42 | this.type = sticker.type; |
| 43 | } else { |
| 44 | this.type ??= null; |
| 45 | } |
| 46 | |
| 47 | if ('format_type' in sticker) { |
| 48 | /** |
| 49 | * The format of the sticker |
| 50 | * @type {StickerFormatType} |
| 51 | */ |
| 52 | this.format = sticker.format_type; |
| 53 | } |
| 54 | |
| 55 | if ('name' in sticker) { |
| 56 | /** |
| 57 | * The name of the sticker |
| 58 | * @type {string} |
| 59 | */ |
| 60 | this.name = sticker.name; |
| 61 | } |
| 62 | |
| 63 | if ('pack_id' in sticker) { |
| 64 | /** |
| 65 | * The id of the pack the sticker is from, for standard stickers |
| 66 | * @type {?Snowflake} |
| 67 | */ |
| 68 | this.packId = sticker.pack_id; |
| 69 | } else { |
| 70 | this.packId ??= null; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…