You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Currently the command handler page is pretty similar to the old message command handler. I have the feeling, that there are some important aspects of slash commands, which are not covered in this guide. While the guide describes how to use multiple files for each commands, it explains nothing about how you should implement subcommands into your command handler. Do I need to put all subcommands from one command in one file? Is there a way to split them? These are just a few questions which I had in mind when I checked out the page. The examples also only show the parameters description: and name:. So for a beginner it is hard to know, if also the command options and defaultPermissions should be included in the command files. Furthermore I have the feeling that the content of the command handler section is sometimes a little bit contrary to the registering-slash-commands page. Can I store the data needed for registering the command data inside a command file or do I need to have it do it separately? Is there a way to include the registering of a command inside the command handler?
Overall I have the feeling, that the command handler page ignores some topics where new user would stumble on.
Solution:
Revise the command handler guide and include a section about how to include subcommands. In addition we could think about ways to include mechanics from other sections (Interactions) so it contains all possible hurdles, a developer could face when switching to slash commands.
Describe alternatives you've considered
If the requested content already exists on another page, we could add links to them in the command handler page, but I feel that this is more a general problem of the command handler page.
Additional notes
I did not have the time yet to work with slash commands by myself so I wasn't able to test any possible solutions. Therefore I decided to create a feature request first as some other users would also like to have more insights on the command handler.
The text was updated successfully, but these errors were encountered:
So, a link to the Discord API regarding how to structure the data for using subcommands does exist on the page. A section with details on how to use the CommandInteractionOptionResolver with subcommands has been added in line with #754.
@MattA-Official yeah #754 already solves some of the issues. Nice to see that it was merged so quickly. I guess the whole deployement discussions also lead to some confusion on my side. I am currently figuring out, what is the best way to deal with sub commands in your command file. Personally I really hate files with hundred lines of code. If you are including the command data (options etc) as well as the different subcommand functions / conditions, in one command file, it gets quite messy. Therefore I am currently splitting these parts in different files. If anyone has a nice solution / structure for that, it would be nice to also have it in the file.
Problem:
Currently the command handler page is pretty similar to the old message command handler. I have the feeling, that there are some important aspects of slash commands, which are not covered in this guide. While the guide describes how to use multiple files for each commands, it explains nothing about how you should implement subcommands into your command handler. Do I need to put all subcommands from one command in one file? Is there a way to split them? These are just a few questions which I had in mind when I checked out the page. The examples also only show the parameters
description:
andname:
. So for a beginner it is hard to know, if also the commandoptions
anddefaultPermissions
should be included in the command files. Furthermore I have the feeling that the content of the command handler section is sometimes a little bit contrary to the registering-slash-commands page. Can I store the data needed for registering the command data inside a command file or do I need to have it do it separately? Is there a way to include the registering of a command inside the command handler?Overall I have the feeling, that the command handler page ignores some topics where new user would stumble on.
Solution:
Revise the command handler guide and include a section about how to include subcommands. In addition we could think about ways to include mechanics from other sections (
Interactions
) so it contains all possible hurdles, a developer could face when switching to slash commands.Describe alternatives you've considered
If the requested content already exists on another page, we could add links to them in the command handler page, but I feel that this is more a general problem of the command handler page.
Additional notes
I did not have the time yet to work with slash commands by myself so I wasn't able to test any possible solutions. Therefore I decided to create a feature request first as some other users would also like to have more insights on the command handler.
The text was updated successfully, but these errors were encountered: