Subcommand issues

I'm having an issue with subcommands where it just doesn't seem to recognize a subcommand. The following is how I register the command I'm having issues with. All of them work fine except guild whitelist. That one throws this error: https://hyperfire-dev.sentry.io/share/issue/1464c7085b934a0296005c7e7ee22553/
@ApplyOptions<Subcommand.Options>({
name: 'access',
preconditions: ['BotDeveloper'],
description: 'Manage access control.',
aliases: ['accesscontrol'],
subcommands: [
{
name: 'help',
default: true,
type: 'method',
messageRun: 'help'
},

{
name: 'user',
type: 'group',
entries: [
{
name: 'blacklist',
type: 'method',
messageRun: 'userBlacklistRun'
}
]
},

/*{
name: 'guild whitelist',
messageRun: 'guildWhitelistRun'
},
{
name: 'guild blacklist',
messageRun: 'guildBlacklistRun'
}*/

{
name: 'guild',
type: 'group',
entries: [
{
name: 'blacklist',
type: 'method',
messageRun: 'guildBlacklistRun'
},
{
name: 'whitelist',
type: 'method',
messageRun: 'guildWhitelistRun'
}
]
}
]
})
@ApplyOptions<Subcommand.Options>({
name: 'access',
preconditions: ['BotDeveloper'],
description: 'Manage access control.',
aliases: ['accesscontrol'],
subcommands: [
{
name: 'help',
default: true,
type: 'method',
messageRun: 'help'
},

{
name: 'user',
type: 'group',
entries: [
{
name: 'blacklist',
type: 'method',
messageRun: 'userBlacklistRun'
}
]
},

/*{
name: 'guild whitelist',
messageRun: 'guildWhitelistRun'
},
{
name: 'guild blacklist',
messageRun: 'guildBlacklistRun'
}*/

{
name: 'guild',
type: 'group',
entries: [
{
name: 'blacklist',
type: 'method',
messageRun: 'guildBlacklistRun'
},
{
name: 'whitelist',
type: 'method',
messageRun: 'guildWhitelistRun'
}
]
}
]
})
Sentry
UserError: No subcommand was matched with the provided arguments.
No subcommand was matched with the provided arguments. UserError C:\Users\goril\Documents\Bots\CT-1.8\node_modules@sapphire\plugin-subcommands\dist\lib\Subcommand.js AccessManagerCommand.messageRun False AccessManagerCommand.messageRun(@sapphire.plugin-subcommands.dist.lib:Subcommand)
8 Replies
Favna
Favna11mo ago
1. In your code you have guild black and whitelist commented out. Not sure if intentional. 2. If they truly all work then I'm gonna need more code. A particular helpful g would be zip or push to githubg
Hyper
Hyper11mo ago
1. Debug, testing if they work outside of sub command groups 2. Send me a friend request, I'll give you all the code you need but it's closed source (you can unfriend after)
Sawako
Sawako11mo ago
Favna
Favna11mo ago
havent got around this yet btw. My mondays and tuesday evenings are generally packed. Just know that I haven't forgotten it. I use channel follows are self-reminders of open issues
Ararou
Ararou11mo ago
i think hes gotten it to work since ive been in his dev server
Favna
Favna11mo ago
@hyperfirers can you confirm this?
Hyper
Hyper11mo ago
Yes and no, kinda a stupid solution, I had to break the commands up
Ararou
Ararou11mo ago
rip
Want results from more Discord servers?
Add your server
More Posts