Open Stijn-van-Nieulande opened 3 months ago
This is semi-intentional. A cloud command is a unique chain of arguments whereas Discord considers the root literal to be the command, and everything else to be an argument. Because a root literal may be used for multiple cloud commands, it would be far less accurate to use the cloud command description as the Discord command description. The component descriptions are re-used across commands so they are a better fit.
The issue here is that the wrong component description is used. It should use the root description, not the tail description.
This is semi-intentional. A cloud command is a unique chain of arguments whereas Discord considers the root literal to be the command, and everything else to be an argument. Because a root literal may be used for multiple cloud commands, it would be far less accurate to use the cloud command description as the Discord command description. The component descriptions are re-used across commands so they are a better fit.
The issue here is that the wrong component description is used. It should use the root description, not the tail description.
That's not really true, you need to specify the description per sub command in constructor (https://javadoc.io/doc/net.dv8tion/JDA/latest/net/dv8tion/jda/api/interactions/commands/build/SubcommandData.html#%3Cinit%3E(java.lang.String,java.lang.String), when using subcommands, the description of the root command is only displayed in guid settings in "interactions" section, and is not really displayed to the user
This is semi-intentional. A cloud command is a unique chain of arguments whereas Discord considers the root literal to be the command, and everything else to be an argument. Because a root literal may be used for multiple cloud commands, it would be far less accurate to use the cloud command description as the Discord command description. The component descriptions are re-used across commands so they are a better fit. The issue here is that the wrong component description is used. It should use the root description, not the tail description.
That's not really true, you need to specify the description per sub command in constructor (https://javadoc.io/doc/net.dv8tion/JDA/latest/net/dv8tion/jda/api/interactions/commands/build/SubcommandData.html#%3Cinit%3E(java.lang.String,java.lang.String), when using subcommands, the description of the root command is only displayed in guid settings in "interactions" section, and is not really displayed to the user
Interesting. I wasn't aware of this, but it'd then be fine to prioritize the command description if it exists. I'd appreciate a PR to deal with this if anyone wants to see it dealt with.
Hello, I got a issue with the @CommandDescription annotations in the new cloud 2 environment with JDA5. When using the command description annotation the value of it is "ignored" and the last parameter of the command is used as the description.
It seems that the description is used of the last non flag argument which doesn't have a description attached to it.