mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
fix(MessageStore): Fix fetchPinned method and add notice. (#1881)
This commit is contained in:
parent
f40a5e9f88
commit
ea1949a0e2
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue