Skip to content

Commit 0c3e289

Browse files
committed
Finish part 8
1 parent dc78715 commit 0c3e289

File tree

1 file changed

+16
-0
lines changed
  • 08 - Ping Command/src/commands/misc

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
name: 'ping',
3+
description: 'Replies with the bot ping!',
4+
5+
callback: async (client, interaction) => {
6+
await interaction.deferReply();
7+
8+
const reply = await interaction.fetchReply();
9+
10+
const ping = reply.createdTimestamp - interaction.createdTimestamp;
11+
12+
interaction.editReply(
13+
`Pong! Client ${ping}ms | Websocket: ${client.ws.ping}ms`
14+
);
15+
},
16+
};

0 commit comments

Comments
 (0)