diff --git a/src/structure/components/commands/utility/Ping.js b/src/structure/components/commands/utility/Ping.js new file mode 100644 index 0000000..2021488 --- /dev/null +++ b/src/structure/components/commands/utility/Ping.js @@ -0,0 +1,24 @@ +const { SlashCommand } = require("../../../interfaces"); + +class PingCommand extends SlashCommand { + + constructor(client) { + + super(client, { + name: 'ping', + description: 'Ping? Pong!', + module: 'utility' + }); + + } + + async execute(interaction) { + const ping = this.client.ws.ping.toFixed(0); + const number = (ping / 40).toFixed(0); + const repeat = number > 1 ? number : 1; + return interaction.reply(`P${`o`.repeat(repeat)}ng! \`${ping}ms\``, { emoji: 'success' }); + } + +} + +module.exports = PingCommand; \ No newline at end of file