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:
Antonio Román
2021-07-04 20:54:27 +02:00
committed by GitHub
parent 281072be44
commit a7c6678c72
95 changed files with 963 additions and 963 deletions

View File

@@ -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);