mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
refact: Sticker's tags property (#8010)
This commit is contained in:
@@ -70,10 +70,10 @@ class Sticker extends Base {
|
|||||||
|
|
||||||
if ('tags' in sticker) {
|
if ('tags' in sticker) {
|
||||||
/**
|
/**
|
||||||
* An array of tags for the sticker
|
* Autocomplete/suggestions for the sticker
|
||||||
* @type {?string[]}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.tags = sticker.tags.split(', ');
|
this.tags = sticker.tags;
|
||||||
} else {
|
} else {
|
||||||
this.tags ??= null;
|
this.tags ??= null;
|
||||||
}
|
}
|
||||||
@@ -246,8 +246,7 @@ class Sticker extends Base {
|
|||||||
other.format === this.format &&
|
other.format === this.format &&
|
||||||
other.name === this.name &&
|
other.name === this.name &&
|
||||||
other.packId === this.packId &&
|
other.packId === this.packId &&
|
||||||
other.tags.length === this.tags.length &&
|
other.tags === this.tags &&
|
||||||
other.tags.every(tag => this.tags.includes(tag)) &&
|
|
||||||
other.available === this.available &&
|
other.available === this.available &&
|
||||||
other.guildId === this.guildId &&
|
other.guildId === this.guildId &&
|
||||||
other.sortValue === this.sortValue
|
other.sortValue === this.sortValue
|
||||||
@@ -257,7 +256,7 @@ class Sticker extends Base {
|
|||||||
other.id === this.id &&
|
other.id === this.id &&
|
||||||
other.description === this.description &&
|
other.description === this.description &&
|
||||||
other.name === this.name &&
|
other.name === this.name &&
|
||||||
other.tags === this.tags.join(', ')
|
other.tags === this.tags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -2303,7 +2303,7 @@ export class Sticker extends Base {
|
|||||||
public packId: Snowflake | null;
|
public packId: Snowflake | null;
|
||||||
public get partial(): boolean;
|
public get partial(): boolean;
|
||||||
public sortValue: number | null;
|
public sortValue: number | null;
|
||||||
public tags: string[] | null;
|
public tags: string | null;
|
||||||
public type: StickerType | null;
|
public type: StickerType | null;
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
public get url(): string;
|
public get url(): string;
|
||||||
|
|||||||
Reference in New Issue
Block a user