Recently (or possibly forever now) the args command has been returning an array value with undefined as the first array value. Upon further delving into your code (SlashCommands.js) at line 65 is where it seems to pass the arguments through as strings, this is returning undefined as it cannot convert an object into a string. My code is a bit long but ill post a small snippet that should be able to replicate the problem
module.exports = {
name: "initials",
slash: true,
options:
[{
name: 'initials', description: 'provide your first and last name', type: Discord.Constants.ApplicationCommandOptionTypes.SUB_COMMAND, required: false, options: [
{ name: 'firstname', description: 'Your first name', type: Discord.Constants.ApplicationCommandOptionTypes.STRING, required: true, options: null },
{ name: 'lastname', description: 'Your last name', type: Discord.Constants.ApplicationCommandOptionTypes.STRING, required: false, options: null }],
}],
callback: async ({ interaction, args, client }) => {
firstname = args[0];
lastname = args[1];
interaction.reply(`Your firstname is ${firstname} and your lastname is ${lastname}`)
}
}
Running this command returns "Your firstname is undefined and your lastname is undefined"
Recently (or possibly forever now) the args command has been returning an array value with undefined as the first array value. Upon further delving into your code (SlashCommands.js) at line 65 is where it seems to pass the arguments through as strings, this is returning undefined as it cannot convert an object into a string. My code is a bit long but ill post a small snippet that should be able to replicate the problem
Running this command returns "Your firstname is undefined and your lastname is undefined"