From 6b586596ae995f88f4ecc7c00fbc1b4e0ac19d2a Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 7 Oct 2022 20:56:54 +0200 Subject: [PATCH] immediate coin join mode --- coin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coin.rb b/coin.rb index c9c9f60..42977e5 100644 --- a/coin.rb +++ b/coin.rb @@ -60,9 +60,6 @@ end bot.run(true) loop do - # sleep until random time from now to midnight - sleep(get_random_duration(Time.now)) - # activate coin state coin_state_active = true # send coin GIF @@ -70,6 +67,9 @@ loop do # sleep until midnight to reset cycle sleep(get_seconds_to_midnight(Time.now)) + # + # sleep until random time from now to next midnight + sleep(get_random_duration(Time.now)) end bot.join()