When I try do use this slash command it says 'Invalid interaction application command'. How do I fix this? I can show more code if needed.
const Command = require('../structures/command.js');
const config = require('../data/config.json');
const { MessageEmbed } = require('discord.js');
const Discord = require('discord.js');
module.exports = new Command({
name: "ping",
description: "Shows the ping of the bot.",
type: "BOTH",
slashCommandOptions: [],
permission: "ADMINISTRATOR",
async run(message, args, client) {
if (message.author.id === config.dev) {
// const pingEmbed = new MessageEmbed()
// .setTitle(`Bot Ping: ${client.ws.ping} ms`)
// .setAuthor('System')
// // .setFooter(`${client.ws.ping} ms`)
// .setColor('5FA6E0')
const m = await message.reply(`Bot Ping: ${client.ws.ping} ms`);
const msg = message instanceof Discord.CommandInteraction ? await message.fetchReply() : m;
msg.edit(`Ping: ${client.ws.ping} ms\nMessage Ping: ${msg.createdTimestamp - message.createdTimestamp} ms`);
} else {
message.reply(`Must be a developer to use the command [${this.name}]`);
}
}
});