0.9.1 heartbeat no longer dropping

This commit is contained in:
2024-08-05 15:01:45 +02:00
parent 5a026afc52
commit e77818e09b
13 changed files with 92 additions and 69 deletions

View File

@@ -10,7 +10,7 @@ pub static PROCESS_UPTIME: Lazy<Mutex<std::time::SystemTime>> =
/// Checks how long the bot has been running
#[poise::command(prefix_command, slash_command, category = "Tools")]
pub async fn uptime(ctx: Context<'_>) -> Result<(), Error> {
let start = PROCESS_UPTIME.lock().unwrap().clone();
let start = *PROCESS_UPTIME.lock().unwrap();
let uptime = std::time::SystemTime::now().duration_since(start).unwrap();
let (days, hours, minutes, seconds) = (