mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user