Add WebSocket latency

This commit is contained in:
toast 2023-12-06 22:13:05 +11:00
parent dab77e7b95
commit b15f3aad6b

View File

@ -2,9 +2,7 @@ use crate::Error;
/// Check if the bot is alive
#[poise::command(slash_command)]
pub async fn ping(
ctx: poise::Context<'_, (), Error>,
) -> Result<(), Error> {
ctx.reply("Powong!").await?;
pub async fn ping(ctx: poise::Context<'_, (), Error>) -> Result<(), Error> {
ctx.reply(format!("Powong! `{:?}`ms", ctx.ping().await.as_millis())).await?;
Ok(())
}