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
I use bot.get_application_command method to get the id of a slash commands to mention
Reproduction Steps
I am currently making a custom help command for my bot which supports slash commands. I want to add mentioned slash commands in help embed for making it easy for users to use the command. await bot.get_application_command("comm_name") works absolutely fine on top level slash commands and returns ApplicationCommand.
But when i use a slash subcommand name like: "foo barr", It returns None even if the sub command is global. Tried adding type=discord.SlashCommandGroup parameter, but still no luck.
The ID is the same as the parent because subcommands behave like options in the API, but I get that get_command should also look for subcommands. Will add that.
Summary
I use bot.get_application_command method to get the id of a slash commands to mention
Reproduction Steps
I am currently making a custom help command for my bot which supports slash commands. I want to add mentioned slash commands in help embed for making it easy for users to use the command.
await bot.get_application_command("comm_name")
works absolutely fine on top level slash commands and returnsApplicationCommand
.But when i use a slash subcommand name like: "foo barr", It returns
None
even if the sub command is global. Tried addingtype=discord.SlashCommandGroup
parameter, but still no luck.Minimal Reproducible Code
Expected Results
returns ApplicationCommand Object
Actual Results
returns None
Intents
member_content
System Information
Checklist
Additional Context
No response
The text was updated successfully, but these errors were encountered: