Add version information to stats command

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/2/head
trivernis 4 years ago
parent db2ee9a146
commit a7045ebe5a
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -2050,7 +2050,7 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]] [[package]]
name = "tobi-rs" name = "tobi-rs"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"aspotify", "aspotify",
"chrono", "chrono",

@ -1,6 +1,6 @@
[package] [package]
name = "tobi-rs" name = "tobi-rs"
version = "0.1.0" version = "0.1.1"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"

@ -8,6 +8,8 @@ use std::process;
use std::time::{Duration, SystemTime, UNIX_EPOCH}; use std::time::{Duration, SystemTime, UNIX_EPOCH};
use sysinfo::{ProcessExt, SystemExt}; use sysinfo::{ProcessExt, SystemExt};
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
#[command] #[command]
#[description("Shows some statistics about the bot")] #[description("Shows some statistics about the bot")]
#[usage("")] #[usage("")]
@ -30,10 +32,11 @@ async fn stats(ctx: &Context, msg: &Message) -> CommandResult {
let discord_info = format!( let discord_info = format!(
r#" r#"
Version: {}
Owner: <@{}> Owner: <@{}>
Guilds: {} Guilds: {}
"#, "#,
bot_info.owner.id, guild_count VERSION, bot_info.owner.id, guild_count
); );
log::trace!("Discord info {}", discord_info); log::trace!("Discord info {}", discord_info);

Loading…
Cancel
Save