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:
Junseo Park
2021-05-01 04:53:25 +09:00
committed by GitHub
parent 63398d6ae4
commit 026afc2c1a
6 changed files with 137 additions and 1 deletions

View File

@@ -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}