Add functionality to mention app commands #5976
Labels
Complex Issue
This issue may require more than a surface level fix or be highly integrated with other components
High Priority
High priority
Status: In Progress
There's a PR open to deal with this, or an org member is working on this internally
Type: Feature
New feature or request.
Type of feature request
API functionality
Description of the feature you're suggesting
Currently mentioning an app command is pain with plain discord.py. You would need to fetch all commands from api and search for the right command. This can be improved by implementing a cache.
A tag from discord.py:
The best way would be adding such cache in the tree. This cache is either supplied on sync or when triggering manually an update with a method.
Furthermore a method to get a mention would be nice. E.g.
Bot.get_app_command_mention(name: str, guild_id: Optional[int]) -> Optional[str]
Usage:
bot.get_app_command_mention('ban')
bot.get_app_command_mention('cog update')
bot.get_app_command_mention('load', guild_id=133049272517001216)
Anything else?
No response
The text was updated successfully, but these errors were encountered: