Adding an Example ContentMenu Command

This commit is contained in:
Raven Scott 2022-09-28 19:05:07 -04:00
parent cbc6740e46
commit 93c3dfa65e
2 changed files with 17 additions and 1 deletions

View File

@ -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) => {

16
commands/context/ping.js Normal file
View File

@ -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] });
},
};