im so fucking retarded for thinking that every reaction was an array. oops!

This commit is contained in:
fzorb 2024-10-06 17:51:17 +03:00
parent 6da8b6bf10
commit ffb94db5fe

View File

@ -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