From ffb94db5fe9aa0fbc87f95e93e37d91c288e4c37 Mon Sep 17 00:00:00 2001 From: fzorb Date: Sun, 6 Oct 2024 17:51:17 +0300 Subject: [PATCH] im so fucking retarded for thinking that every reaction was an array. oops! --- systems/starboard.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/systems/starboard.rb b/systems/starboard.rb index 673123b..5f936c3 100644 --- a/systems/starboard.rb +++ b/systems/starboard.rb @@ -6,16 +6,16 @@ module StarboardSystem extend Discordrb::EventContainer reaction_add do |event| reactions = 0 - for reaction in event.message.reactions do + for reaction in event.message.reactions if reaction.name == "⭐" - reactions = reactions + 1 + reactions = reaction.count end end attachments = "" for attachment in event.message.attachments do attachments += " #{attachment.url}" end - if reactions == ENV['MINSTARS'].to_i + if reactions >= ENV['MINSTARS'].to_i message = event.message.content.sub!("@", "[at]") if message == nil message = event.message.content