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

Add model methods for creating public and private threads #1468

Merged
merged 3 commits into from Aug 11, 2021

Conversation

arqunis
Copy link
Member

@arqunis arqunis commented Aug 11, 2021

Description

This adds two new methods, create_public_thread and create_private_thread, on ChannelId and GuildChannel. Without these, the only possible way for one to create a thread is to make a request with the HTTP client, which has a low-level API.

This also adjusts the formatting of CreateThread::kind's note.

Type of Change

This is in an improvement to the API of the library, specifically in the models.

How Has This Been Tested?

The methods have been tested by calling them in command code and then sending a message to the newly-created channel. Both work as expected.

@arqunis arqunis added enhancement An improvement to Serenity. model Related to the `model` module. labels Aug 11, 2021
@arqunis arqunis merged commit dbf4d68 into serenity-rs:current Aug 11, 2021
@arqunis arqunis deleted the thread_methods branch August 11, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement to Serenity. model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant