disnake
disnake copied to clipboard
feat: select menu default values
Summary
https://github.com/discord/discord-api-docs/commit/515931a022c672837caad092799be8543d9e966b
This implements the new default_values field for auto-populated (i.e. non-string) select menus. The PR is pretty much finished, but it could use some more testing.
Note that this doesn't currently implement message.resolved, which contains resolved objects for components[*].default_values. We have nowhere to put this data right now, since component objects store plain SelectDefaultValues, but implementing it in the future would be pretty simple. The data isn't all that useful in most cases, anyway.
Checklist
- [x] If code changes were made, then they have been tested
- [x] I have updated the documentation to reflect the changes
- [x] I have formatted the code properly by running
pdm lint - [x] I have type-checked the code by running
pdm pyright
- [ ] 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, ...)