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:
Lewdcario
2018-06-04 22:21:45 -05:00
parent eef4a4ad17
commit f238883046

View File

@@ -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;
});
}
}