Update Bot
This commit is contained in:
@@ -6,8 +6,7 @@ module.exports = {
|
||||
.setName('ping')
|
||||
.setDescription('Affiche la latence du bot.'),
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply();
|
||||
const sent = await interaction.fetchReply();
|
||||
const sent = await interaction.deferReply({ fetchReply: true });
|
||||
|
||||
const apiLatency = Math.round(interaction.client.ws.ping);
|
||||
const roundTripLatency = sent.createdTimestamp - interaction.createdTimestamp;
|
||||
@@ -30,4 +29,4 @@ module.exports = {
|
||||
|
||||
await interaction.editReply({ embeds: [embed] });
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user