Merge pull request #8 from ethanrusz/pog

Add pog command
This commit is contained in:
Em (Ethan) Ruszanowski 2023-03-14 13:52:43 -04:00 committed by GitHub
commit f4889fadc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 0 deletions

View file

@ -5,3 +5,4 @@ pub mod profile;
pub mod random; pub mod random;
pub mod register; pub mod register;
pub mod team; pub mod team;
pub mod pog;

35
src/commands/pog.rs Normal file
View file

@ -0,0 +1,35 @@
use crate::serenity;
use crate::{Context, Error};
#[poise::command(slash_command, subcommands("up", "down"))]
pub async fn pog(_ctx: Context<'_>) -> Result<(), Error> {
Ok(())
}
/// Increases the pogs
#[poise::command(slash_command)]
pub async fn up(ctx: Context<'_>) -> Result<(), Error> {
ctx.send(|f| {
f.embed(|f| {
f.title("Pog Status")
.description("The pog level has been increased.")
.color(serenity::Colour::DARK_GREEN)
})
})
.await?;
Ok(())
}
/// Decreases the pogs
#[poise::command(slash_command)]
pub async fn down(ctx: Context<'_>) -> Result<(), Error> {
ctx.send(|f| {
f.embed(|f| {
f.title("Pog Status")
.description("The pog level has been decreased.")
.color(serenity::Colour::RED)
})
})
.await?;
Ok(())
}

View file

@ -17,6 +17,7 @@ async fn main() {
commands::random::random(), commands::random::random(),
commands::register::register(), commands::register::register(),
commands::profile::profile(), commands::profile::profile(),
commands::pog::pog(),
], // IntelliJ doesn't like this, but it's fine. ], // IntelliJ doesn't like this, but it's fine.
..Default::default() ..Default::default()
}) })