Sleep was set to 60 when smaller 30 rather than larger 30

This commit is contained in:
Neshura 2023-07-31 22:55:50 +02:00
parent e7f971ccd8
commit 1ee425352d
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -135,9 +135,10 @@ impl Bot {
pub(crate) fn idle(&self) {
let mut sleep_duration = chrono::Duration::seconds(30);
if Utc::now().time() - self.start_time.time() < sleep_duration {
if Utc::now().time() - self.start_time.time() > sleep_duration {
sleep_duration = chrono::Duration::seconds(60);
}
while Utc::now().time() - self.start_time.time() < sleep_duration {
sleep(time::Duration::from_secs(10));
}