Skip to content

Commit

Permalink
Finish part 8
Browse files Browse the repository at this point in the history
  • Loading branch information
notunderctrl committed Jan 15, 2023
1 parent dc78715 commit 0c3e289
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 08 - Ping Command/src/commands/misc/ping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
name: 'ping',
description: 'Replies with the bot ping!',

callback: async (client, interaction) => {
await interaction.deferReply();

const reply = await interaction.fetchReply();

const ping = reply.createdTimestamp - interaction.createdTimestamp;

interaction.editReply(
`Pong! Client ${ping}ms | Websocket: ${client.ws.ping}ms`
);
},
};

0 comments on commit 0c3e289

Please sign in to comment.