Skip to content

Commit

Permalink
fix(reaction-roles): Fix reaction on all messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Dec 2, 2019
1 parent d1e3f1c commit 59cb7b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/management/services/ManagementService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export class ManagementService {
const reactionRoles = await this.client.cache.reactionRoles.get(message.channel.guild.id);

const reactionRole = reactionRoles.find(role => {
if (role.channelId !== message.channel.id || role.messageId !== message.id) {
return false;
}
const splits = role.emoji.split(':');
if (splits.length === 1) {
return emoji.name === splits[0];
Expand All @@ -34,6 +37,9 @@ export class ManagementService {
if (message.channel instanceof TextChannel) {
const reactionRoles = await this.client.cache.reactionRoles.get(message.channel.guild.id);
const reactionRole = reactionRoles.find(role => {
if (role.channelId !== message.channel.id || role.messageId !== message.id) {
return false;
}
const splits = role.emoji.split(':');
if (splits.length === 1) {
return emoji.name === splits[0];
Expand Down

0 comments on commit 59cb7b8

Please sign in to comment.