feat(ping): command now shows latency instead of just replying with Pong

This commit is contained in:
Seaswimmer 2023-08-22 16:01:41 -04:00
parent e8be911f9f
commit 2284bc1a33
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -5,6 +5,8 @@ module.exports = {
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
await interaction.reply('Pong!');
interaction.reply('🏓').then (async (msg) => {
msg.edit(`🏓Latency is \`${Date.now() - msg.createdTimestamp}ms\``);
});
},
};