From 3a8db697b7288cbd88ab5be6698ebb6c2cf82af4 Mon Sep 17 00:00:00 2001 From: almostSouji Date: Mon, 1 Feb 2021 19:47:40 +0100 Subject: [PATCH] fix(ReactionUserManager): remove before query option --- 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 f98a2361a41a..77d6ab5d5ea8 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 9cf19cce4c66..393c48375605 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2004,11 +2004,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; }