affluence/src/commands/mod.rs

38 lines
951 B
Rust

mod affluence;
mod minecraft;
mod users;
use crate::{Context, Data, Error};
type EmbedField = (String, String, bool);
pub fn commands() -> Vec<poise::structs::Command<Data, Error>> {
vec![
help(),
affluence::available(),
minecraft::ping_mc(),
users::register(),
users::registered(),
]
}
/// Show this help menu
#[poise::command(prefix_command, track_edits, slash_command)]
pub async fn help(
ctx: Context<'_>,
#[description = "Specific command to show help about"]
#[autocomplete = "poise::builtins::autocomplete_command"]
command: Option<String>,
) -> Result<(), Error> {
poise::builtins::help(
ctx,
command.as_deref(),
poise::builtins::HelpConfiguration {
extra_text_at_bottom: "This is an example bot made to showcase features of my custom Discord bot framework",
..Default::default()
},
)
.await?;
Ok(())
}