#help```jsError Invalid Array lengthat Object.run (workspacenode_modulessapphireshapeshiftd
1 messages · Page 1 of 1 (latest)
help
Error: Invalid Array length
at Object.run (/workspace/node_modules/@sapphire/shapeshift/dist/index.js:217:79)
at /workspace/node_modules/@sapphire/shapeshift/dist/index.js:113:66
at Array.reduce (<anonymous>)
at ArrayValidator.parse (/workspace/node_modules/@sapphire/shapeshift/dist/index.js:113:29)
at validateMaxOptionsLength (/workspace/node_modules/@discordjs/builders/dist/index.js:900:27)
at MixedClass.addSubcommand (/workspace/node_modules/@discordjs/builders/dist/index.js:1428:5)
at /workspace/handlers/slashCommands.js:22:9
at Array.forEach (<anonymous>)
at module.exports (/workspace/handlers/slashCommands.js:8:41)
at /workspace/main.js:54:35
at Array.forEach (<anonymous>)
at Object.<anonymous> (/workspace/main.js:53:6)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-05-23 13:13:00.756911: I tensorflow/core/
handler:
addSubcommand((subcommand) => {
subcommand.setName(String(pull.name).toLowerCase()).setDescription(pull.description)
if(pull.options){
options.opp(subcommand)
…
example cmd exports code:
module.exports = {
name: "3000years",
description: "Its been 3000 years…",
cooldown: 10,
memberpermissions: [],
requiredroles: [],
alloweduserids: [],
opp : function(subcommand) {
subcommand.addUserOption((op)=> {
op.setName("user")
op.setDescription("The user's avatar that wanted to manipulate")
op.setRequired(false)
})
},
run: async (client, interaction) => {
…
Do you mean pull.opp instead of options.opp?
And there is no options in your exports anyway
its pull then buti got same err
Show the whole code of the subcommand thing, do you return the subcommand at the end?
ok one sec
im using tomato handler
(i made a lot changes on it)
There’s still not a options property in the referenced file of yours. But I feel the reason for your error is that one of your subcommands has more than 25 options or you add more than 25 subcommands to a command
yes i added more than 25 subcmds
i want to moved everything to slash
so can be verified
each category like 120 to 150
please help me fix the error uwu 🥺
Easy: remove any subcommands that exceed the limit of 25 and move them into another command or use subcommandgroups
subcommand groups?
does bots really need to changed to slash
?
how to register to have normal cmds
i have like 1200 cmds
…
/command subcommandgroup subcommand option1: option2: ...
Yes, you do have to if you are in more than 100 servers and want to keep working after August 1st
but i don't want make it become option
Huh? You already have your options, what do you mean?
Subcommandgroups are basically another layer of subcommand, call it subsubcommand if you want
ohhh i don't know about the sub cmd groups before
anyways,may i ask it is possible on djs/builders?
and how?
uwu please help
SlashCommandBuilder#addSubcommandGroup()
Adds a new subcommand group to this command