mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
refactor: change xID to xId (#6036)
* refactor: change `xID` to `xId` * Update src/managers/MessageManager.js Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -34,7 +34,7 @@ class ReactionUserManager extends CachedManager {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs.
|
||||
* Fetches all the users that gave this reaction. Resolves with a collection of users, mapped by their ids.
|
||||
* @param {FetchReactionUsersOptions} [options] Options for fetching the users
|
||||
* @returns {Promise<Collection<Snowflake, User>>}
|
||||
*/
|
||||
@@ -58,11 +58,11 @@ class ReactionUserManager extends CachedManager {
|
||||
* @returns {Promise<MessageReaction>}
|
||||
*/
|
||||
remove(user = this.client.user) {
|
||||
const userID = this.client.users.resolveID(user);
|
||||
if (!userID) return Promise.reject(new Error('REACTION_RESOLVE_USER'));
|
||||
const userId = this.client.users.resolveId(user);
|
||||
if (!userId) return Promise.reject(new Error('REACTION_RESOLVE_USER'));
|
||||
const message = this.reaction.message;
|
||||
return this.client.api.channels[message.channel.id].messages[message.id].reactions[this.reaction.emoji.identifier][
|
||||
userID === this.client.user.id ? '@me' : userID
|
||||
userId === this.client.user.id ? '@me' : userId
|
||||
]
|
||||
.delete()
|
||||
.then(() => this.reaction);
|
||||
|
||||
Reference in New Issue
Block a user