diff --git a/commands/Info/ping.js b/commands/Info/ping.js index 1eac0a6..9a6b3d6 100644 --- a/commands/Info/ping.js +++ b/commands/Info/ping.js @@ -2,7 +2,7 @@ const { EmbedBuilder } = require('discord.js'); module.exports = { name: "ping", - private: false, + private: true, description: "Returns websocket latency", run: async (client, interaction) => { diff --git a/commands/context/ping.js b/commands/context/ping.js new file mode 100644 index 0000000..ed946c5 --- /dev/null +++ b/commands/context/ping.js @@ -0,0 +1,16 @@ +const { EmbedBuilder } = require('discord.js'); +const {ApplicationCommandType } = require('discord.js'); + +module.exports = { + name: "ping-test", + type: ApplicationCommandType.Message, + run: async (client, interaction) => { + const embed = new EmbedBuilder() + .setColor("#FF0000") + .setTitle("🏓 Pong!") + .setDescription(`Latency : ${client.ws.ping}ms`) + .setTimestamp() + .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` }); + interaction.followUp({ embeds: [embed] }); + }, +};