aboutsummaryrefslogblamecommitdiff
path: root/src/commands/meta.rs
blob: d2c55640e41aac5757247ec55affd447f2a8f099 (plain) (tree)





































                                                                                    
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(())
}