feat(cmd/utils): adding ping command

This commit is contained in:
Raphael 2025-07-27 18:23:38 +02:00
parent bb7d5b2cf0
commit 212e3cf7c6

View file

@ -0,0 +1,18 @@
import { MessageFlags, SlashCommandBuilder } from 'discord.js';
export default {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Show your latency'),
async execute(interaction: CommandInteraction) {
const time: number = Date.now();
await interaction.reply({
content: '🏓 | Pong!',
flags: MessageFlags.Ephemeral
});
await interaction.editReply({
content: `⏱️ | Response latency: **${Date.now() - time}**ms`
});
}
}