From f2388830465d886c77e77e0046f32040034d380b Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Mon, 4 Jun 2018 22:21:45 -0500 Subject: [PATCH] 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 --- src/structures/MessageReaction.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index be4f450e9..29a03c7d4 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -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; }); } }