discord-api-docs
discord-api-docs copied to clipboard
``INVITES_DISABLED`` feature does not properly validate existance of ``COMMUNITY`` feature and can create multiple public channel update followers
Description
Setting INVITES_DISABLED and COMMUNITY features in the same API request causes an unsuitable state.
The backend creates the public update channel follower webhook but errors with a 403 on the INVITES_DISABLED feature as the guild didn't have the COMMUNITY feature at the beginning of the request. However, this doesn't remove the public_updates webhook, but doesn't save it as the public update channel follower webhook either, creating a phantom webhook that cannot be deleted, but exists.
As such, I now have six channel follower webhooks on a channel, and cannot create more, and am getting the error of max webhooks created for a channel.
initial report: https://github.com/discord/discord-api-docs/pull/5269#issuecomment-1229246874
Steps to Reproduce
This code can be ran up to 10 times and will create 10 channel followers but not remove them... (replace token with a valid bot token and VALID_CHANNEL_ID with valid channel ids in the guild)
curl 'https://canary.discord.com/api/v9/guilds/:id' \
-X 'PATCH' \
-H 'authority: canary.discord.com' \
-H 'accept-language: en-GB' \
-H 'authorization: 'BOT token' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.48 Chrome/91.0.4472.164 Electron/13.6.6 Safari/537.36' \
-H 'content-type: application/json' \
-H 'accept: */*' \
-H 'origin: https://canary.discord.com' \
--data-raw '{"rules_channel_id":VALID_CHANNEL_ID,"public_updates_channel_id":VALID_CHANNEL_ID,"features":["COMMUNITY","INVITES_DISABLED"]}'
(note: removed unrelated features)
Expected Behavior
The INVITES_DISABLED
feature should be available to all guilds whether they have COMMUNITY
enabled or not, doesn't make sense to gate it, especially when its not truly gated, but additionally the COMMUNITY
feature should not be able to fall into a half-initialized state.
Current Behavior
The backend partially sets up the community guild but does not complete set-up and aborts part way through.
Screenshots/Videos
No response
Client and System Information
disnake v2.6.0a
Addtionally, when fixing this issue, would a dev please remove all or all but one of the public update channel followers from guild ID 755083284416954428?
Because the INVITES_DISABLED feature is not fully rolled out, the cleanest way to support this is to just disallow the updating of public channels when the INVITES_DISABLED feature is provided. This limitation may go away in the future. This should be live some time tomorrow.
Because the INVITES_DISABLED feature is not fully rolled out
does "fully rolled out" here mean it will be released to non-community servers at some point? as it released to all community servers a while ago