Add random command and subcommand framework

This commit is contained in:
Em (Ethan) Ruszanowski 2023-01-11 17:02:40 -05:00
parent a3a673c7e6
commit a2e7d6f531
No known key found for this signature in database
GPG key ID: C3E7A3C0B1491DFE
3 changed files with 30 additions and 0 deletions

View file

@ -1,3 +1,4 @@
// Group all commands for registration
pub(crate) mod slur;
pub(crate) mod team_up;
pub(crate) mod random;

28
src/commands/random.rs Normal file
View file

@ -0,0 +1,28 @@
use crate::{Context, Error};
/// Picks a random something
#[poise::command(slash_command, prefix_command, subcommands("god", "mode"))]
pub(crate) async fn random(
ctx: Context<'_>,
) -> Result<(), Error> {
ctx.say("Pick a subcommand, idiot.").await?;
Ok(())
}
/// Picks a random god to play
#[poise::command(slash_command, prefix_command)]
pub(crate) async fn god(
ctx: Context<'_>,
) -> Result<(), Error> {
ctx.say("Waiting for that sweet API access.").await?;
Ok(())
}
/// Picks a random mode to play
#[poise::command(slash_command, prefix_command)]
pub(crate) async fn mode(
ctx: Context<'_>,
) -> Result<(), Error> {
ctx.say("Waiting for that sweet API access.").await?;
Ok(())
}

View file

@ -14,6 +14,7 @@ async fn main() {
commands: vec![
commands::slur::slur(),
commands::team_up::team_up(),
commands::random::random(),
], // IntelliJ doesn't like this, but it's fine.
..Default::default()
})