discord-api-docs
discord-api-docs copied to clipboard
Creating overwrite directly after creating a channel causes incorrect CHANNEL_UPDATE
Description
The recently introduced channel emoji experiment has introduced a new CHANNEL_UPDATE event, which fires directly after the channel is created. This causes problems when another update happens before that emoji is created.
This invalid state is cached persistently. You can fix this by editing the channel manually:
https://github.com/discord/discord-api-docs/assets/18090140/971cbfd5-40cd-4812-ac13-163953dcb91c
Steps to Reproduce
- Create a new text channel
- Immediately add a new overwrite using the PATCH endpoint
- Receive two CHANNEL_UPDATE events
The first CHANNEL_UPDATE adds the permission overwrites:
{
...
"permission_overwrites" : [ {
"allow" : "1024",
"deny" : "0",
"id" : "86699011792191488",
"type" : 1
} ],
...
}
The second CHANNEL_UPDATE removes it, but adds an icon emoji:
{
...
"icon_emoji" : {
"name" : "...",
"id" : null
},
"permission_overwrites" : [],
...
}
Note that manually fetching the channel via the GET /channels/:channel_id
endpoint returns the correct state that includes the overwrite.
Expected Behavior
The second update event should not remove the overwrite.
Current Behavior
The event removes the overwrite.
Screenshots/Videos
No response
Client and System Information
API v10