My code for a command called ping looks like this:
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
options: [
{
name: 'message',
description: 'Replies with your message!',
type: 'string',
required: false,
default: 'Pong!'
}
],
async execute(interaction, args) {
const [ message ] = args;
return interaction.reply(ping);
},
};
And currently, when I run this command (and deploy the slash commands first), there is no user enterable parameter, and it throws an error.
argsdefined as?argsand see what it is, seems like it's not a string array