diff --git a/bot.rb b/bot.rb index 446d21d..94965f6 100644 --- a/bot.rb +++ b/bot.rb @@ -43,7 +43,8 @@ end bot.reaction_remove do |event| next unless event.emoji.name == PIN_EMOJI - event.message.unpin unless event.message.reactions.include? PIN_EMOJI + pin_reactions = event.message.reactions.filter {|el| el.name == PIN_EMOJI} + event.message.unpin if pin_reactions.empty? nil end