diff --git a/src/bot/botrulez/uptime.rs b/src/bot/botrulez/uptime.rs index 1264dde..a892ed3 100644 --- a/src/bot/botrulez/uptime.rs +++ b/src/bot/botrulez/uptime.rs @@ -7,20 +7,6 @@ use crate::api::Message; use crate::bot::command::{ClapCommand, Context}; use crate::conn; -/// Show how long the bot has been online. -#[derive(Parser)] -pub struct Args { - /// Show how long the bot has been connected without interruption. - #[arg(long, short)] - connected: bool, -} - -pub struct Uptime; - -pub trait HasStartTime { - fn start_time(&self) -> OffsetDateTime; -} - pub fn format_time(t: OffsetDateTime) -> String { let t = t.to_offset(UtcOffset::UTC); let format = format_description!("[year]-[month]-[day] [hour]:[minute]:[second] UTC"); @@ -59,6 +45,20 @@ pub fn format_duration(d: Duration) -> String { } } +pub struct Uptime; + +pub trait HasStartTime { + fn start_time(&self) -> OffsetDateTime; +} + +/// Show how long the bot has been online. +#[derive(Parser)] +pub struct Args { + /// Show how long the bot has been connected without interruption. + #[arg(long, short)] + connected: bool, +} + #[async_trait] impl ClapCommand for Uptime where