tools and kashi init

This commit is contained in:
2024-01-30 15:43:59 +01:00
parent 65950e3d50
commit a9006f1068
7 changed files with 44 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
use std::time::SystemTime;
use serenity::{all::Message, client::Context, framework::standard::{macros::command, CommandResult}};
use crate::commands::misc::check_msg;
#[command]
async fn ping(ctx: &Context, msg: &Message) -> CommandResult {
let system_now = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_millis() as i64;
let message_now = msg.timestamp.timestamp_millis();
// println!("System Time: {} ||| Message Time: {}", system_now, message_now);
check_msg(msg.reply(ctx, format!("Pong! (latency: {} ms)", system_now - message_now)).await);
Ok(())
}