Sleep was set to 60 when smaller 30 rather than larger 30
This commit is contained in:
parent
e7f971ccd8
commit
1ee425352d
1 changed files with 2 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue