disnake icon indicating copy to clipboard operation
disnake copied to clipboard

fix: make commands.(bot_)has_permissions work without the bot in server

Open onerandomusername opened this issue 3 years ago • 1 comments

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, ...)

onerandomusername avatar Jul 28 '22 19:07 onerandomusername

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.

onerandomusername avatar Jul 28 '22 20:07 onerandomusername

Created an issue for the API discrepancy: https://github.com/discord/discord-api-docs/issues/5316

onerandomusername avatar Aug 13 '22 21:08 onerandomusername

API discrepancy has been resolved.

onerandomusername avatar Aug 31 '22 17:08 onerandomusername