mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix(MessageReaction): fetchUsers inconsistency
Unlike TextChannel#fetchMessages, this method returned the cache rather than the fetched items, so in interests of consistency, this does as well now closes #2574
This commit is contained in:
parent
eef4a4ad17
commit
f238883046
1 changed files with 5 additions and 3 deletions
|
|
@ -81,12 +81,14 @@ class MessageReaction {
|
|||
const message = this.message;
|
||||
return message.client.rest.methods.getMessageReactionUsers(
|
||||
message, this.emoji.identifier, { after, before, limit }
|
||||
).then(users => {
|
||||
for (const rawUser of users) {
|
||||
).then(data => {
|
||||
const users = new Collection();
|
||||
for (const rawUser of data) {
|
||||
const user = this.message.client.dataManager.newUser(rawUser);
|
||||
this.users.set(user.id, user);
|
||||
users.set(user.id, user);
|
||||
}
|
||||
return this.users;
|
||||
return users;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue