disnake
disnake copied to clipboard
fix: make commands.(bot_)has_permissions work without the bot in server
Summary
If the channel is not cached (or the bot in not in the server) this will make has_permissions work on interactions.
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
task lint - [x] I have type-checked the code by running
task pyright
- [x] This PR fixes an issue
- [ ] 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, ...)
This is blocked by a potential API bug.
The change is here: https://discord.com/developers/docs/change-log#changes-to-bot-permissions-for-interactions-and-webhooks and I'm waiting for a rollout of this change to see if the bug still exists.
Created an issue for the API discrepancy: https://github.com/discord/discord-api-docs/issues/5316
API discrepancy has been resolved.