From b9df37a89f86acb9a6fd48b235dd672e5f0aa65b Mon Sep 17 00:00:00 2001 From: markisha64 <72348035+markisha64@users.noreply.github.com> Date: Sun, 5 Jun 2022 23:29:31 +0200 Subject: [PATCH] refact: Sticker's `tags` property (#8010) --- packages/discord.js/src/structures/Sticker.js | 11 +++++------ packages/discord.js/typings/index.d.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/discord.js/src/structures/Sticker.js b/packages/discord.js/src/structures/Sticker.js index 132064a27..9c5cdfe8a 100644 --- a/packages/discord.js/src/structures/Sticker.js +++ b/packages/discord.js/src/structures/Sticker.js @@ -70,10 +70,10 @@ class Sticker extends Base { if ('tags' in sticker) { /** - * An array of tags for the sticker - * @type {?string[]} + * Autocomplete/suggestions for the sticker + * @type {?string} */ - this.tags = sticker.tags.split(', '); + this.tags = sticker.tags; } else { this.tags ??= null; } @@ -246,8 +246,7 @@ class Sticker extends Base { other.format === this.format && other.name === this.name && other.packId === this.packId && - other.tags.length === this.tags.length && - other.tags.every(tag => this.tags.includes(tag)) && + other.tags === this.tags && other.available === this.available && other.guildId === this.guildId && other.sortValue === this.sortValue @@ -257,7 +256,7 @@ class Sticker extends Base { other.id === this.id && other.description === this.description && other.name === this.name && - other.tags === this.tags.join(', ') + other.tags === this.tags ); } } diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index ef2c62621..5c2512909 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2303,7 +2303,7 @@ export class Sticker extends Base { public packId: Snowflake | null; public get partial(): boolean; public sortValue: number | null; - public tags: string[] | null; + public tags: string | null; public type: StickerType | null; public user: User | null; public get url(): string;