mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(MessageStore): Fix fetchPinned method and add notice. (#1881)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user