mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Add limit param to reaction.fetchUsers
This commit is contained in:
parent
5dd76069f8
commit
b15896e0a4
1 changed files with 3 additions and 2 deletions
|
|
@ -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<Collection<string, User>>}
|
||||
*/
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue