im so fucking retarded for thinking that every reaction was an array. oops!
This commit is contained in:
parent
6da8b6bf10
commit
ffb94db5fe
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user