); // Logging the set locale in i18n
// Time the interaction was created
const sentAt = interaction.createdTimestamp;
// Reply to the interaction
const reply = await interaction.reply({ content: 'Pinging...', fetchReply: true });
// Time the reply was created
const repliedAt = reply.createdTimestamp;
// Calculate the latency
const latency = repliedAt - sentAt;
// Edit the reply to show the latency using translation
await interaction.editReply(i18n.__('ping.response', { latency:
); // Logging the set locale in i18n
// Time the interaction was created
const sentAt = interaction.createdTimestamp;
// Reply to the interaction
const reply = await interaction.reply({ content: 'Pinging...', fetchReply: true });
// Time the reply was created
const repliedAt = reply.createdTimestamp;
// Calculate the latency
const latency = repliedAt - sentAt;
// Edit the reply to show the latency using translation
await interaction.editReply(i18n.__('ping.response', { latency: