discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

POST /guilds/{guild.id}/channels does not support setting `default_thread_rate_limit`

Open vladfrangu opened this issue 1 year ago • 1 comments

Description

The POST /guilds/{guild.id}/channels endpoint doesn't support setting default_thread_rate_limit by default when creating a new forum channel.

Steps to Reproduce

fetch("https://canary.discord.com/api/v10/guilds/<ID>/channels", {
  "headers": {
    "authorization": "Bot <TOKEN>",
    "content-type": "application/json",
  },
  "body": JSON.stringify({ type: 15, name: "example-forum", default_thread_rate_limit: 10 }),
  "method": "POST"
});

Expected Behavior

It should support automatically setting the value

Current Behavior

The value is ignored

Screenshots/Videos

No response

Client and System Information

N/A

vladfrangu avatar Aug 31 '22 15:08 vladfrangu

Didn't notice until now, but its named default_thread_rate_limit_per_user.

onerandomusername avatar Sep 14 '22 17:09 onerandomusername

This appears to be fixed:

$ curl -X POST -H "$AUTH" -H "Content-Type: application/json" \
  -d '{"type": 15, "name": "test-forum", "default_thread_rate_limit_per_user": 42}' \
  https://discord.com/api/v10/guilds/<guild id>/channels

{
    "id": "1022859017468518491",
    "last_message_id": null,
    "default_thread_rate_limit_per_user": 42,
    ...
}

shiftinv avatar Sep 23 '22 13:09 shiftinv