Création Repo pour mon bot Le Tamiseur
This commit is contained in:
11
commands/global/ping.js
Executable file
11
commands/global/ping.js
Executable file
@@ -0,0 +1,11 @@
|
||||
const { SlashCommandBuilder } = require('discord.js')
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('ping')
|
||||
.setDescription('Check the latency of the bot'),
|
||||
async execute(interaction) {
|
||||
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`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user