Include app_permissions when resolving/fetching a channel #5754
Unanswered
Pnoexz
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This has been discussed in #3310 and #4758, but considering app_permissions has already been implemented at the guild level (#5131), I believe a standalone discussion will help bring attention to it
As a developer of a stateless app, I want to see my bot's computed permissions for a specific channel so that I can easily warn the admins which actions my app won't be able to perform due to missing permissions
A significant step in configuring my app requires an admin to select a category where the bot has MANAGE_PERMISSIONS and MANAGE_CHANNELS. To ensure reliability, I would like to assert this before updating my database, but I'm not happy with the alternatives:
Try to perform all those actions individually and expect a non 200 http status code. This is pretty resource intensive and doesn't scale at all. I believe Endpoint to fetch resolved channel/guild permissions #4758 does a better job explaining why this isn't a good alternative
Fetch the permissions for the app and all its roles, @everybody's permissions, and the category's permission overwrites, and compute them myself. This is prone to errors (computing permissions is hard) and race conditions (I would have to refresh the cache between the user running
/configure
and selecting the category). Artificially delaying and deferring the response to the interaction to ensure the cache is valid is bad user experienceAs mentioned in #4758, computed permissions are needed every time an app tries to send a message or a Discord client refreshes the channel list, so this must be a highly optimized process on your side. Exposing this attribute in the API will allow stateless apps to improve significantly the user experience for our users
Beta Was this translation helpful? Give feedback.
All reactions