From 43bd568f1c38a6df38f56a8d607375ccc9da026a Mon Sep 17 00:00:00 2001 From: Souji Date: Sun, 28 Mar 2021 15:28:33 +0200 Subject: [PATCH] fix(ReactionUserManager): remove before query option (#5281) --- src/managers/ReactionUserManager.js | 5 ++--- typings/index.d.ts | 6 +----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/managers/ReactionUserManager.js b/src/managers/ReactionUserManager.js index f98a2361a..77d6ab5d5 100644 --- a/src/managers/ReactionUserManager.js +++ b/src/managers/ReactionUserManager.js @@ -28,15 +28,14 @@ class ReactionUserManager extends BaseManager { * Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs. * @param {Object} [options] Options for fetching the users * @param {number} [options.limit=100] The maximum amount of users to fetch, defaults to 100 - * @param {Snowflake} [options.before] Limit fetching users to those with an id lower than the supplied id * @param {Snowflake} [options.after] Limit fetching users to those with an id greater than the supplied id * @returns {Promise>} */ - async fetch({ limit = 100, after, before } = {}) { + async fetch({ limit = 100, after } = {}) { const message = this.reaction.message; const data = await this.client.api.channels[message.channel.id].messages[message.id].reactions[ this.reaction.emoji.identifier - ].get({ query: { limit, before, after } }); + ].get({ query: { limit, after } }); const users = new Collection(); for (const rawUser of data) { const user = this.client.users.add(rawUser); diff --git a/typings/index.d.ts b/typings/index.d.ts index de88c35ad..97adf209d 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2009,11 +2009,7 @@ declare module 'discord.js' { export class ReactionUserManager extends BaseManager { constructor(client: Client, iterable: Iterable | undefined, reaction: MessageReaction); public reaction: MessageReaction; - public fetch(options?: { - limit?: number; - after?: Snowflake; - before?: Snowflake; - }): Promise>; + public fetch(options?: { limit?: number; after?: Snowflake }): Promise>; public remove(user?: UserResolvable): Promise; }