-
Notifications
You must be signed in to change notification settings - Fork 588
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
Support creating standalone public threads #2470
Conversation
CI failure seems to be unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor things. I think mentioning that threads linked to messages will always be public is something we should do, so the docs change to the create_thread_from_message
methods should be reverted. It might also be worth changing the docs on CreateThread::kind
to mention how the field is ignored for message threads (as well as how it defaults to private for standalone threads).
Discord's API has two endpoints for creating threads: one for creating a thread as a reply to a message and one for creating a thread that's not connected to any existing message. The former only supports creating public threads, but the latter supports both public and private threads. However, serenity did not allow creating public standalone threads. This PR fills that gap, and renames the methods for calling these endpoints to more accurately describe what they do.
When I brought up the missing functionality in the #serenity channel, @arqunis claimed that the “start thread without message” endpoint was only for private threads, pointing to this part of the documentation:
I believe that this is a misunderstanding of the docs. They say “defaults to
PRIVATE_THREAD
”, not “must bePRIVATE_THREAD
”. I also tested calling the endpoint manually withtype
set toPUBLIC_THREAD
and it works as expected.