diff --git a/Cargo.lock b/Cargo.lock index ee74dd0..166e54c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2269,7 +2269,7 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tobi-rs" -version = "0.2.0" +version = "0.2.1" dependencies = [ "aspotify", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 6cd07e4..d1dd6e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tobi-rs" -version = "0.2.0" +version = "0.2.1" authors = ["trivernis "] edition = "2018" diff --git a/src/commands/misc/about.rs b/src/commands/misc/about.rs new file mode 100644 index 0000000..b3ef1d4 --- /dev/null +++ b/src/commands/misc/about.rs @@ -0,0 +1,24 @@ +use serenity::client::Context; +use serenity::framework::standard::macros::command; +use serenity::framework::standard::CommandResult; +use serenity::model::channel::Message; + +#[command] +#[description("Displays information about the bot")] +async fn about(ctx: &Context, msg: &Message) -> CommandResult { + msg.channel_id + .send_message(ctx, |m| { + m.embed(|e| { + e.title("About").description(format!( + "\ + I'm a general purpose discord bot written in rusty Rust. \ + My main focus is providing information about all kinds of stuff and playing music.\ + Use `{}help` to get an overview of the commands I provide.", + std::env::var("BOT_PREFIX").unwrap() + )) + }) + }) + .await?; + + Ok(()) +} diff --git a/src/commands/misc/mod.rs b/src/commands/misc/mod.rs index 0a524d3..5f2ab1d 100644 --- a/src/commands/misc/mod.rs +++ b/src/commands/misc/mod.rs @@ -8,6 +8,7 @@ use shutdown::SHUTDOWN_COMMAND; use stats::STATS_COMMAND; use time::TIME_COMMAND; use timezones::TIMEZONES_COMMAND; +use about::ABOUT_COMMAND; pub(crate) mod help; mod pekofy; @@ -18,7 +19,8 @@ mod shutdown; mod stats; mod time; mod timezones; +mod about; #[group] -#[commands(ping, stats, shutdown, pekofy, time, timezones, qalc, sauce)] +#[commands(ping, stats, shutdown, pekofy, time, timezones, qalc, sauce, about)] pub struct Misc;