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

Sync builders with Discord API #2425

Merged
merged 22 commits into from
May 11, 2023
Merged

Conversation

kangalio
Copy link
Collaborator

@kangalio kangalio commented May 9, 2023

Analogous to #2393 but with serenity::builder::*. Not quite as large of a PR, luckily

Fixes #2398

I have skipped the whole topic of message attachments for now, but I will add it later. Once that happens, this PR also fixes #2412

EDIT: nevermind, I noticed all message sending builders already supported files on next (#2412 is about current not having them):

  • CreateMessage has add_file, add_files, files
  • CreateInteractionResponseMessage has add_file, add_files, files
  • ExecuteWebhook has add_file, add_files, files
  • EditMessage has attachment, keep_existing_attachment, remove_existing_attachment
  • EditInteractionResponse has new_attachment, clear_existing_attachments, keep_existing_attachment
  • EditWebhookMessage has new_attachment, clear_existing_attachments, keep_existing_attachment

@github-actions github-actions bot added builder Related to the `builder` module. examples Related to Serenity's examples. model Related to the `model` module. labels May 9, 2023
@kangalio kangalio marked this pull request as ready for review May 9, 2023 10:16
@kangalio kangalio linked an issue May 9, 2023 that may be closed by this pull request
@arqunis arqunis added enhancement An improvement to Serenity. discord feature Related to Discord's functionality. labels May 10, 2023
@kangalio
Copy link
Collaborator Author

Merge conflicts fixed (was this the blocker?)

@arqunis arqunis merged commit 382a17e into serenity-rs:next May 11, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request May 18, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request May 19, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request May 30, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Sep 21, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 17, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 24, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
arqunis pushed a commit to arqunis/serenity that referenced this pull request Oct 24, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
arqunis pushed a commit to arqunis/serenity that referenced this pull request Oct 24, 2023
* Add a bunch of CreateChannel fields

* Add a bunch of EditChannel fields

* Make CreateEmbed{Author, Footer} into newtypes

* Add CreateCommand::nsfw and sort fields

* CreateInteractionResponseFollowup

Sort fields and remove username and avatar_url because those are only supported in webhooks

* Make EditInteractionResponse newtype over EditWebhookMessage

Replaced EditWebhookMessage's methods with EditInteractionResponse's ones (they function the same) and make EditInteractionResponse delegate

* Make AutocompleteChoice alias to CommandOptionChoice

They're same according to Discord

* Add CreateMessage::nonce

* Sort CreateScheduledEvent fields

* Add CreateStageInstance::privacy_level

* CreateSticker: remove optional fields from constructor

* Make CreateGuildWelcomeChannel newtype

* Add EditGuild::premium_progress_bar_enabled

* Add EditMember::flags

* Add EditScheduledEvent::privacy_level

* Add EditStageInstance::privacy_level

* Add EditThread::{rate_limit_per_user, flags}

* Add ExecuteWebhook::thread_name

* Fix WebhookIncomming misspelling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder Related to the `builder` module. discord feature Related to Discord's functionality. enhancement An improvement to Serenity. examples Related to Serenity's examples. model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synchronize builder structs with Discord API
2 participants