mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat(Sticker): added Sticker (#4909)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: monbrey <rsm999@uowmail.edu.au> Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com> Co-authored-by: Advaith <advaithj1@gmail.com> Co-authored-by: izexi <43889168+izexi@users.noreply.github.com> Co-authored-by: Mestery <48163546+Mesteery@users.noreply.github.com> Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ const MessageAttachment = require('./MessageAttachment');
|
||||
const Embed = require('./MessageEmbed');
|
||||
const Mentions = require('./MessageMentions');
|
||||
const ReactionCollector = require('./ReactionCollector');
|
||||
const Sticker = require('./Sticker');
|
||||
const { Error, TypeError } = require('../errors');
|
||||
const ReactionManager = require('../managers/ReactionManager');
|
||||
const Collection = require('../util/Collection');
|
||||
@@ -133,6 +134,17 @@ class Message extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of stickers in the message
|
||||
* @type {Collection<Snowflake, Sticker>}
|
||||
*/
|
||||
this.stickers = new Collection();
|
||||
if (data.stickers) {
|
||||
for (const sticker of data.stickers) {
|
||||
this.stickers.set(sticker.id, new Sticker(this.client, sticker));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The timestamp the message was sent at
|
||||
* @type {number}
|
||||
|
||||
Reference in New Issue
Block a user