From b15896e0a4febe59f4fe9e73f099a4d03c038f2a Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 27 Oct 2016 21:28:03 +0100 Subject: [PATCH] Add limit param to reaction.fetchUsers --- src/structures/MessageReaction.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageReaction.js b/src/structures/MessageReaction.js index 2fe115736..aa82ec827 100644 --- a/src/structures/MessageReaction.js +++ b/src/structures/MessageReaction.js @@ -116,12 +116,13 @@ class MessageReaction { /** * Fetch all the users that gave this reaction. Resolves with a collection of users, * mapped by their IDs. + * @param {number} [limit=100] the maximum amount of users to fetch, defaults to 100 * @returns {Promise>} */ - fetchUsers() { + fetchUsers(limit = 100) { const message = this.message; return new Promise((resolve, reject) => { - message.client.rest.methods.getMessageReactionUsers(message.channel.id, message.id, this.emoji.identifier) + message.client.rest.methods.getMessageReactionUsers(message.channel.id, message.id, this.emoji.identifier, limit) .then(users => { this.users = new Collection(); for (const rawUser of users) {