mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feat(Sticker): updates, sticker packs, and guild stickers (#5867)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: BannerBomb <BannerBomb55@gmail.com> Co-authored-by: Noel <icrawltogo@gmail.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ const GuildChannelManager = require('../managers/GuildChannelManager');
|
||||
const GuildEmojiManager = require('../managers/GuildEmojiManager');
|
||||
const GuildInviteManager = require('../managers/GuildInviteManager');
|
||||
const GuildMemberManager = require('../managers/GuildMemberManager');
|
||||
const GuildStickerManager = require('../managers/GuildStickerManager');
|
||||
const PresenceManager = require('../managers/PresenceManager');
|
||||
const RoleManager = require('../managers/RoleManager');
|
||||
const StageInstanceManager = require('../managers/StageInstanceManager');
|
||||
@@ -404,6 +405,20 @@ class Guild extends AnonymousGuild {
|
||||
emojis: data.emojis,
|
||||
});
|
||||
}
|
||||
|
||||
if (!this.stickers) {
|
||||
/**
|
||||
* A manager of the stickers belonging to this guild
|
||||
* @type {GuildStickerManager}
|
||||
*/
|
||||
this.stickers = new GuildStickerManager(this);
|
||||
if (data.stickers) for (const sticker of data.stickers) this.stickers._add(sticker);
|
||||
} else if (data.stickers) {
|
||||
this.client.actions.GuildStickersUpdate.handle({
|
||||
guild_id: this.id,
|
||||
stickers: data.stickers,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user