mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: ping command
This commit is contained in:
1 parent
78d429808a
commit
78424c1535
2 files changed
+40
-6
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import cmdName from '../core/interaction/cmdName.js';
|
||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||
|
||||
export default {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inPublic: true,
|
||||
handlesInteraction: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
.setName(cmdName('ping'))
|
||||
.setDescription('Check if the bot is alive'),
|
||||
|
||||
async execute(interaction) {
|
||||
const executionStart = new Date().getTime();
|
||||
await interaction.editReply('Pong 🏓');
|
||||
const executionTime = new Date().getTime() - executionStart;
|
||||
interaction.editReply(`Pong 🏓 - ${executionTime}ms`);
|
||||
},
|
||||
} satisfies CommandRegistry;
|
||||
Reference in new issue
Block a user