Rustbot/src/commands/ping.rs

9 lines
235 B
Rust
Raw Normal View History

2023-12-04 00:35:42 -05:00
use crate::Error;
/// Check if the bot is alive
#[poise::command(slash_command)]
2023-12-06 06:13:05 -05:00
pub async fn ping(ctx: poise::Context<'_, (), Error>) -> Result<(), Error> {
2023-12-10 05:03:52 -05:00
ctx.reply(format!("Powong! `{:?}`", ctx.ping().await)).await?;
2023-12-04 00:35:42 -05:00
Ok(())
}