diff --git a/coin.rb b/coin.rb index 6a73b56..adfa621 100644 --- a/coin.rb +++ b/coin.rb @@ -55,7 +55,7 @@ end bot.message(in: Integer(ENV['BOT_CHANNEL'])) do |event| puts event.message if event.message.attachments.count { |x| x.filename.scan(/coin*/).length > 0 } > 0 - event.respond "Oh no! Looks like you tried to post a fradulent coin! #{event.author.name}, your coin balance has now been emptied. Let that be a lesson for next time!" + event.respond "Oh no! Looks like you tried to post a fradulent coin! #{event.author.display_name}, your coin balance has now been emptied. Let that be a lesson for next time!" empty_coin(event.author.id) end end @@ -96,6 +96,7 @@ loop do # if max coins per day has reached, sleep until midnight if coins_offered_today >= MAX_COINS_PER_DAY sleep(get_seconds_to_midnight(Time.now)) + sleep(get_random_hours(0, 11)) coins_offered_today = 0 end end