discord.py
discord.py copied to clipboard
Store app command ids on CommandTree
Summary
As it was desired, I have written an implementation that stores app command ids on the CommandTree and keeps them updated via sync, fetch and on callback. Also added two new methods to get the ID and return the mention format.
Checklist
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [ ] This PR fixes an issue.
- [x] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
I'm not sure I follow the reasoning for this existing since users can specify their own tree class, this is something users could implement without it needing to be extra objects stored for all users of command tree. Or if an implementation which caches this is going to exist in the library, it could be a subclass that's available for users to opt-into.
other more nit-feedback was already mentioned in discord.