Skip to content

Commit 169d4c3

Browse files
authored
refactor(ReactionUserManager): use client property (#4829)
1 parent 13d64e6 commit 169d4c3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/managers/ReactionUserManager.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ class ReactionUserManager extends BaseManager {
4848

4949
/**
5050
* Removes a user from this reaction.
51-
* @param {UserResolvable} [user=this.reaction.message.client.user] The user to remove the reaction of
51+
* @param {UserResolvable} [user=this.client.user] The user to remove the reaction of
5252
* @returns {Promise<MessageReaction>}
5353
*/
54-
remove(user = this.reaction.message.client.user) {
55-
const message = this.reaction.message;
56-
const userID = message.client.users.resolveID(user);
54+
remove(user = this.client.user) {
55+
const userID = this.client.users.resolveID(user);
5756
if (!userID) return Promise.reject(new Error('REACTION_RESOLVE_USER'));
58-
return message.client.api.channels[message.channel.id].messages[message.id].reactions[
59-
this.reaction.emoji.identifier
60-
][userID === message.client.user.id ? '@me' : userID]
57+
const message = this.reaction.message;
58+
return this.client.api.channels[message.channel.id].messages[message.id].reactions[this.reaction.emoji.identifier][
59+
userID === this.client.user.id ? '@me' : userID
60+
]
6161
.delete()
6262
.then(() => this.reaction);
6363
}

0 commit comments

Comments
 (0)