Can't load subcommand
Hello, i'm trying to update to the latest djs and sapphire versions (from djs v13 and sapphire v3) and I have this structure for a subcommand where I have a file for each subcommand and a index where I declare and import them, before updating sapphire it searched all the files in the folder until it found the index, now it seems it only checks the first file (add) and doesn't load the subcommand correctly. Is there any way to fix this without having to change the structure and declare all the subcommands in one file?
Error:
Solution:Jump to solution
That does not follow the structure for the command nor subcommand loader of sapphire or plugin-subcommands. If you want your subcommnands to be their own files with plugin-subcommands then
1. define them in the root command
2. import functions from other files
3. make sure those files start with a
_
symbol (i.e. _add.ts
) so sapphire skips them when loading
3. call those functions in the appropiate methods...2 Replies
Solution
That does not follow the structure for the command nor subcommand loader of sapphire or plugin-subcommands. If you want your subcommnands to be their own files with plugin-subcommands then
1. define them in the root command
2. import functions from other files
3. make sure those files start with a
_
symbol (i.e. _add.ts
) so sapphire skips them when loading
3. call those functions in the appropiate methodsAlright, thanks!