forked from mud/bankerbot-rb
fix coin state active
This commit is contained in:
parent
ed0f5d33e7
commit
339f42234a
7
coin.rb
7
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
|
||||
|
Loading…
Reference in New Issue
Block a user