fix(MessageStore): Fix fetchPinned method and add notice. (#1881)

This commit is contained in:
Robin B
2017-09-04 05:26:36 +02:00
committed by Crawl
parent f40a5e9f88
commit ea1949a0e2

View File

@@ -61,10 +61,12 @@ class MessageStore extends DataStore {
/**
* Fetches the pinned messages of this channel and returns a collection of them.
* <info>The returned Collection does not contain the reactions of the messages.
* Those need to be fetched seperately.</info>
* @returns {Promise<Collection<Snowflake, Message>>}
*/
fetchPinned() {
return this.client.api.channels[this.message.channel.id].pins.get().then(data => {
return this.client.api.channels[this.channel.id].pins.get().then(data => {
const messages = new Collection();
for (const message of data) messages.set(message.id, this.create(message));
return messages;