add version command
This commit is contained in:
@@ -7,6 +7,7 @@ mod gambling;
|
||||
mod eval;
|
||||
pub mod self_roles;
|
||||
mod settings;
|
||||
mod version;
|
||||
|
||||
use crate::common::{Data, Error, Context};
|
||||
|
||||
@@ -35,5 +36,6 @@ pub fn commands() -> Vec<Command<Data, Error>> {
|
||||
eval::eval(),
|
||||
self_roles::role(),
|
||||
settings::setting(),
|
||||
version::version(),
|
||||
]
|
||||
}
|
||||
|
||||
8
src/commands/version.rs
Normal file
8
src/commands/version.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use crate::common::{Context, Error};
|
||||
|
||||
/// Tells you the current version of BigBirb
|
||||
#[poise::command(slash_command, prefix_command)]
|
||||
pub async fn version(ctx: Context<'_>) -> Result<(), Error> {
|
||||
ctx.reply(format!("version {} ({}/{})", env!("CARGO_PKG_VERSION"), env!("GIT_BRANCH"), env!("GIT_HASH"))).await?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user