Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial forums documentation #4761

Merged
merged 4 commits into from
Apr 8, 2022
Merged

Initial forums documentation #4761

merged 4 commits into from
Apr 8, 2022

Conversation

ajpalkovic
Copy link
Contributor

Note: We are documenting forums in two phases. Today is phase 1 contianing the things that are least likely to change, and are easy to implement, and will provide the most value if implemented early. We'll followup in the future with full documentation at a future time.

docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Show resolved Hide resolved
Note: We are documenting forums in two phases. Today is phase 1 contianing the things that are least likely to change, and are easy to implement, and will provide the most value if implemented early. We'll followup in the future with full documentation at a future time.
docs/topics/Threads.md Outdated Show resolved Hide resolved

Creates a new thread in a forum channel, and sends a message within the created thread. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](#DOCS_TOPICS_GATEWAY/thread-create) and [Message Create](#DOCS_TOPICS_GATEWAY/message-create) Gateway event.

- The type of the created thread is `GUILD_PUBLIC_THREAD`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This phrasing makes it seem like you don't need to specify type 11 when using this endpoint or that you can't have private threads in a forum. Unfortunately not passing type leads to a 50024 error. I'm unsure if that's a bug.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this endpoint is broken atm, if you do include the type field, it will ignore the message data, and if you don't it'll give you an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of those fun, but rare, times where the docs are ahead of the code lol.
Route isn't live yet, and I'll need to migrate our callers over to it gracefully, so for at least a month, our clients will have to opt-in to the new behavior, and then once updates are fully available everywhere I'll switch the new behavior to be the default for forums and remove the old one.

PapiOphidian added a commit to AmandaDiscord/DiscordTypings that referenced this pull request Apr 7, 2022
Removed UnknownChannel. Fixes type narrowing channels can include UnknownChannel.
Fixes missing system_channel_flags in Guild
Rename GuildChannel to GuildBasedChannel.
Exported new member called GuildChannel which is an Exclude of type Channel excluding DMChannel and thread based channels
Export new member called ThreadChannel which is a union of all thread based channels.
Added guild_id to Interaction data.
Document ForumChannels (discord/discord-api-docs#4761)
Add code to throw an error if module.default is accessed in code as this module doesn't export anything usable in code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants