pycord
pycord copied to clipboard
Can't get the ID of a slash subcommand
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 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.
Minimal Reproducible Code
a = self.bot.get_application_command("parent subcommand", type=discord.SlashCommandGroup)
print(a)
Expected Results
returns ApplicationCommand Object
Actual Results
returns None
Intents
member_content
System Information
- Python v3.9.6-final
- py-cord v2.1.1-final
- aiohttp v3.7.4.post0
- system info: Windows 10 10.0.22000
Checklist
- [X] I have searched the open issues for duplicates.
- [x] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
No response
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.
Status Update please @Pycord-Development/maintainers