Réécriture complète en Typescript

This commit is contained in:
Angels-dev
2024-01-14 22:53:06 +01:00
parent 6ffa521888
commit 07d54abdba
108 changed files with 2477 additions and 1943 deletions

11
src/commands/global/ping.ts Executable file
View File

@@ -0,0 +1,11 @@
import { SlashCommandBuilder, ChatInputCommandInteraction } from 'discord.js'
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Check the latency of the bot'),
async execute(interaction: ChatInputCommandInteraction) {
let sent = await interaction.reply({ content: 'Pinging...', fetchReply: true })
interaction.editReply(`Websocket heartbeat: ${interaction.client.ws.ping}ms.\nRoundtrip latency: ${sent.createdTimestamp - interaction.createdTimestamp}ms`)
}
}