plugin-subcommands "No subcommand was matched"
I'm configuring my subcommand with:
No errors occur, but
/config logs on
(which yes, i have registered) spits out "UserError: No subcommand was matched with the provided command."14 Replies
WAIT, let me see if it could be a ts5 issue
Silly question maybe but have you called the /register of the plugin?
Yes, I originally thought this was the issue because I forgot it, but it's there now
Otherwise set debug breakpoints in the JS code in node_modules tbh. Can't really give any other tips seeing as you seem to have covered all bases.
Well other than dumping all code here and me or someone else would do the same but if you can do it yourself it's
1. A very good learning experience
2. Saves other people work ![kekw](https://cdn.discordapp.com/emojis/834124742741983312.png)
![kekw](https://cdn.discordapp.com/emojis/834124742741983312.png)
I was having issues with my database due to a typescript version (breaking decorator changes), what TS version should i be on?
5 is fine
Just make sure you use the experimental decorator compiler option
Setting those to true uses legacy decorators still
Hmm.. looks like
mapping.type
is set to method
automatically in @sapphire/plugin-subcommands/dist/lib/Subcommand.js:189 which bypasses the check on :192![](https://utfs.io/f/43f0c5f7-6b2f-4b1d-a9b5-675fe1cb19f5-1nq2cb.png)
![](https://utfs.io/f/dcef1a6c-05b1-40d6-985c-b16f1c73c00d-1nq2cb.png)
Am I supposed to explicitly pass type: group?
I am.
That would be my issue!
Solution
The solution:
Oh haha
Yes
I forgot
Pretty sure the documentation specify that
Well typedoc so on hover
Sapphire Framework
Interface: SubcommandMappingMethod | Sapphire
subcommands/src.SubcommandMappingMethod
Docs say it too