#Issue with deploying commands
1 messages · Page 1 of 1 (latest)
what's the error
To help you we need more information:
• What are you trying to do?
• What is your code?
• What errors and debug logs do you have?
and what is the array
Was going to aask the same thing.
at StringValidator.handle (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/node_modules/@sapphire/shapeshift/dist/index.js:1654:70)
at StringValidator.parse (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/node_modules/@sapphire/shapeshift/dist/index.js:113:88)
at validateDescription (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.cjs:16:24)
at Object.validateRequiredParameters (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.cjs:27:3)
at MixedClass.toJSON (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.cjs:32:16)
at /Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/deploy-commands.js:133:26
at Array.map (<anonymous>)
at Object.<anonymous> (/Volumes/JOEL'S DISK/Discord Bots/Blazing Wheels Discord Bot/deploy-commands.js:133:3)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) {
validator: 's.string',
given: undefined
}```
The const commands
Show code
the problem is with the commands not the toJSON()
@neat tusk
// .setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles)
There is the issue
Remove it
You can't use notes in array. Same counts for JSON files.
The issue was there before I added //
0_0
Let me try again
Is SlashCommandBuilder defined?
Yep
Issue still happening
deploy-commands.js:133:26
Can you check that file and that line of code.
.map(command => command.toJSON());
After I removed the line, the error is now 132:26
That's a permission.....
Which is no longer valid as well...
Discord.js removed those.

Was trying to stop some members using a command
They don't exist anymore...
What does that mean?
Nvm. They do.
You're doing something there... With an object.
It does... pls do research
Can you give me like 133 of deploy-commands.js
permissions v2 still has it...
Like I said, I corrected myself...
Nvm. They do.
didn't see it
Blank cos deleted a line. 132 is ``` .map(command => command.toJSON());
Can you give us more than just .map()
We want to see what you're actually doing before it.
I don't seem to find an issue in your command array.

Glad it's not just me 😅
What is before you map it.
@old gull one of your commands (or maybe options) are missing description
What are you trying to map.
Nope.
Oh wait.
You're right.
new SlashCommandBuilder()
.setName('sysmsg')
.addSubcommand(subcommand => subcommand
.setName('rolesmsg')
.setDescription('Send the role giving messages.'),
)
.addSubcommand(subcommand => subcommand
.setName('welcome')
.setDescription('Send the welcome and rules messages.'),
),
bruh
Just seen. Trying now...
Ok it worked
They are
Oh...