DisKan/slash/ping.js

19 lines
620 B
JavaScript
Raw Normal View History

2022-01-24 14:05:30 -05:00
exports.run = async (client, interaction) => { // eslint-disable-line no-unused-vars
await interaction.deferReply();
const reply = await interaction.editReply("Ping?");
await interaction.editReply(`Pong! Latency is ${reply.createdTimestamp - interaction.createdTimestamp}ms. API Latency is ${Math.round(client.ws.ping)}ms.`);
};
exports.commandData = {
name: "ping",
description: "Pongs when pinged.",
options: [],
defaultPermission: true,
};
// Set guildOnly to true if you want it to be available on guilds only.
// Otherwise false is global.
exports.conf = {
permLevel: "User",
guildOnly: false
};