3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Ignore low prio errors in ReactionRoles

This commit is contained in:
Dragory 2019-02-16 11:29:20 +02:00
parent 69fc5f5df5
commit aec251aa34

View file

@ -194,7 +194,9 @@ export class ReactionRolesPlugin extends ZeppelinPlugin {
const member = this.guild.members.get(userId);
if (!member) return;
member.addRole(matchingReactionRole.role_id);
member.addRole(matchingReactionRole.role_id).catch(() => {
console.warn(`Could not add role ${matchingReactionRole.role_id} to ${userId}`);
});
}
@d.event("messageReactionRemove")
@ -205,6 +207,8 @@ export class ReactionRolesPlugin extends ZeppelinPlugin {
const member = this.guild.members.get(userId);
if (!member) return;
member.removeRole(matchingReactionRole.role_id);
member.removeRole(matchingReactionRole.role_id).catch(() => {
console.warn(`Could not remove role ${matchingReactionRole.role_id} from ${userId}`);
});
}
}