From 339f42234a2f05d47ba33cf6393c963673ca7e08 Mon Sep 17 00:00:00 2001 From: mud mud Date: Mon, 10 Oct 2022 19:47:09 +0000 Subject: [PATCH] fix coin state active --- coin.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/coin.rb b/coin.rb index 3992cf5..4c803d7 100644 --- a/coin.rb +++ b/coin.rb @@ -64,16 +64,13 @@ end bot.run(true) loop do - # activate coin state - coin_state_active = true - # sleep random amount of time between 1 and 4 hours sleep(get_random_hours(1, 4)) - + # activate coin state + coin_state_active = true # send coin GIF bot.send_file(ENV['BOT_CHANNEL'], File.open('./coin.gif', 'r')) coins_offered_today += 1 - sleep(1) # if max coins per day has reached, sleep until midnight if coins_offered_today >= MAX_COINS_PER_DAY