3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +00:00

Fix member fetching in a few places

This commit is contained in:
Dragory 2019-05-02 08:21:11 +03:00
parent d6ffa06e2c
commit ef9afee8b4
6 changed files with 19 additions and 19 deletions

View file

@ -162,7 +162,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<IReactionRolesPluginConf
timeout: null,
changes: [],
applyFn: async () => {
const member = await this.guild.members.get(memberId);
const member = await this.getMember(memberId);
if (member) {
const newRoleIds = new Set(member.roles);
for (const change of newPendingRoleChangeObj.changes) {
@ -336,7 +336,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<IReactionRolesPluginConf
const reactionRoles = await this.reactionRoles.getForMessage(msg.id);
if (reactionRoles.length === 0) return;
const member = this.guild.members.get(userId);
const member = await this.getMember(userId);
if (!member) return;
if (emoji.name === CLEAR_ROLES_EMOJI) {