diff options
| author | Cara Salter <cara@devcara.com> | 2022-01-07 13:33:31 -0500 | 
|---|---|---|
| committer | Cara Salter <cara@devcara.com> | 2022-01-07 13:33:31 -0500 | 
| commit | 3f9376a46efeb53b494a8b5272fc15be6ca5869a (patch) | |
| tree | c3dc6e9a1b8362479718e8c8ea7d90ea6c3b6a75 /src/commands/meta.rs | |
| download | glitch-ng-3f9376a46efeb53b494a8b5272fc15be6ca5869a.tar.gz glitch-ng-3f9376a46efeb53b494a8b5272fc15be6ca5869a.zip | |
Initial Commit
Diffstat (limited to 'src/commands/meta.rs')
| -rw-r--r-- | src/commands/meta.rs | 38 | 
1 files changed, 38 insertions, 0 deletions
| diff --git a/src/commands/meta.rs b/src/commands/meta.rs new file mode 100644 index 0000000..d2c5564 --- /dev/null +++ b/src/commands/meta.rs @@ -0,0 +1,38 @@ +use crate::{Context, Error}; +use poise::serenity_prelude as serenity; + +/// Pings the bot +#[poise::command(prefix_command, slash_command)] +pub async fn ping(ctx: Context<'_>) -> Result<(), Error> { +    ctx.say("Pong!").await?; + +    Ok(()) +} + +/// Shows information about the bot +#[poise::command(prefix_command, slash_command)] +pub async fn about(ctx: Context<'_>) -> Result<(), Error> { +    let current_version = env!("CARGO_PKG_VERSION"); +     +    if let Err(e) = ctx.send(|m| { +        m.embed(|e| { +            e.title("Glitch"); + +            e +        }); +        m +    }).await { +        return Err(e.into()); +    } + +    Ok(()) +} + +#[poise::command(prefix_command, slash_command, context_menu_command = "User Info")] +pub async fn userinfo(ctx: Context<'_>, +                      #[description = "The user to get info on"] +                      user: serenity::User, +                      ) -> Result<(), Error> { + +    Ok(()) +} | 
