feat(utils/ping): adding the emoji parameters in Ping run

This commit is contained in:
Raphael 2026-02-15 23:44:10 +01:00
parent f6fd4c9a75
commit a08b70b94a
No known key found for this signature in database

View file

@ -1,6 +1,7 @@
use std::time::Instant; use std::time::Instant;
use crate::commands::{CommandEntry, SlashCommand}; use crate::commands::{CommandEntry, SlashCommand};
use crate::config::EmojiConfig;
use serenity::all::{ use serenity::all::{
CommandInteraction, Context, CreateCommand, CreateInteractionResponse, CommandInteraction, Context, CreateCommand, CreateInteractionResponse,
@ -30,6 +31,7 @@ impl SlashCommand for Ping {
ctx: &Context, ctx: &Context,
command: &CommandInteraction, command: &CommandInteraction,
_database: &PgPool, _database: &PgPool,
_emoji: &EmojiConfig,
) -> Result<(), serenity::Error> { ) -> Result<(), serenity::Error> {
let message: CreateInteractionResponseMessage = CreateInteractionResponseMessage::new() let message: CreateInteractionResponseMessage = CreateInteractionResponseMessage::new()
.content("🏓 | Pong!") .content("🏓 | Pong!")
@ -42,7 +44,7 @@ impl SlashCommand for Ping {
let delta_time: u128 = start.elapsed().as_millis(); let delta_time: u128 = start.elapsed().as_millis();
let edit_msg: EditInteractionResponse = let edit_msg: EditInteractionResponse =
EditInteractionResponse::new().content(format!("Ping: **{delta_time}**ms")); EditInteractionResponse::new().content(format!("{} | Ping: **{delta_time}**ms", _emoji.answer.yes));
command.edit_response(&ctx.http, edit_msg).await?; command.edit_response(&ctx.http, edit_msg).await?;