From 1fabf2c76fa5fd72ce59b908f989e1bfd0af3202 Mon Sep 17 00:00:00 2001 From: Ethan Ruszanowski Date: Tue, 14 Mar 2023 13:48:35 -0400 Subject: [PATCH] Add pog command --- src/commands/mod.rs | 1 + src/commands/pog.rs | 35 +++++++++++++++++++++++++++++++++++ src/main.rs | 1 + 3 files changed, 37 insertions(+) create mode 100644 src/commands/pog.rs diff --git a/src/commands/mod.rs b/src/commands/mod.rs index aab0d7e..07440bb 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -5,3 +5,4 @@ pub mod profile; pub mod random; pub mod register; pub mod team; +pub mod pog; diff --git a/src/commands/pog.rs b/src/commands/pog.rs new file mode 100644 index 0000000..4f0dfbd --- /dev/null +++ b/src/commands/pog.rs @@ -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(()) +} diff --git a/src/main.rs b/src/main.rs index c4b6a9b..13db93e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ async fn main() { commands::random::random(), commands::register::register(), commands::profile::profile(), + commands::pog::pog(), ], // IntelliJ doesn't like this, but it's fine. ..Default::default() })