Skip to content

Commit

Permalink
Merge pull request #5 from korewaChino/origin/ping-latency
Browse files Browse the repository at this point in the history
ping: Also show latency to Discord
  • Loading branch information
lleyton authored Mar 7, 2023
2 parents 20c5794 + 63386f4 commit 24e0f09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/neko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export class Neko {
description: "Ping me!",
})
ping(interaction: CommandInteraction): void {
interaction.reply("Pong! ^._.^");

// Get ping from Discord API
const ping = interaction.client.ws.ping;
interaction.reply(`Pong! ^._.^, my latency to Discord is \`${ping}ms\`!`);
}

@Slash({
Expand Down

0 comments on commit 24e0f09

Please sign in to comment.