discord.py
discord.py copied to clipboard
Add command_id and custom_id attributes to Interaction
Summary
This PR adds the following attributes to Interaction for ease of access and type safety for people that want it:
-
command_id -
custom_id
Both are from interaction.data and self-explanatory.
They are cached properties so they don’t exist unless used, and when they do, their values stay the same.
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, ...)