From 08786bdd694430652d2d8705b0f09cf2cd1f2a7a Mon Sep 17 00:00:00 2001 From: Neshura Date: Sat, 29 Jul 2023 02:36:40 +0200 Subject: [PATCH] Added Uptime Kuma Push --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 81726ef..1ccafaa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,9 +96,10 @@ impl Bot { } pub(crate) fn idle(&self) { - while Utc::now().time() - self.start_time.time() < chrono::Duration::seconds(60) { + while Utc::now().time() - self.start_time.time() < chrono::Duration::seconds(30) { sleep(time::Duration::from_secs(10)); } + let _ = reqwest::blocking::get("https://status.neshweb.net/api/push/7s1CjPPzrV?status=up&msg=OK&ping="); } pub(crate) fn print_info(&self) { @@ -143,6 +144,7 @@ fn run_bot() { // Enter a loop (not for debugging) loop { + this.idle(); this.run_once(old); this.print_info(); this.idle();