forked from mud/bankerbot-rb
immediate coin join mode
This commit is contained in:
parent
ae4b1ea6d5
commit
6b586596ae
6
coin.rb
6
coin.rb
@ -60,9 +60,6 @@ end
|
|||||||
bot.run(true)
|
bot.run(true)
|
||||||
|
|
||||||
loop do
|
loop do
|
||||||
# sleep until random time from now to midnight
|
|
||||||
sleep(get_random_duration(Time.now))
|
|
||||||
|
|
||||||
# activate coin state
|
# activate coin state
|
||||||
coin_state_active = true
|
coin_state_active = true
|
||||||
# send coin GIF
|
# send coin GIF
|
||||||
@ -70,6 +67,9 @@ loop do
|
|||||||
|
|
||||||
# sleep until midnight to reset cycle
|
# sleep until midnight to reset cycle
|
||||||
sleep(get_seconds_to_midnight(Time.now))
|
sleep(get_seconds_to_midnight(Time.now))
|
||||||
|
#
|
||||||
|
# sleep until random time from now to next midnight
|
||||||
|
sleep(get_random_duration(Time.now))
|
||||||
end
|
end
|
||||||
|
|
||||||
bot.join()
|
bot.join()
|
||||||
|
Loading…
Reference in New Issue
Block a user