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 EditCommand builder #3028

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

mkrasnitski
Copy link
Collaborator

This separates the the builders for creating versus editing a command, since it's not possible to change the type of a command (in serenity this is the kind field). Also, the name field is not required when editing a command.

@github-actions github-actions bot added model Related to the `model` module. builder Related to the `builder` module. labels Nov 12, 2024
Comment on lines +335 to +336
#[serde(flatten)]
fields: EditCommand<'a>,
Copy link
Member

Choose a reason for hiding this comment

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

I like this, a lot. We should do this more.

@GnomedDev GnomedDev merged commit 9eec520 into serenity-rs:next Nov 12, 2024
21 checks passed
GnomedDev pushed a commit that referenced this pull request Nov 13, 2024
This separates the the builders for creating versus editing a command,
since it's not possible to change the `type` of a command (in serenity
this is the `kind` field). Also, the `name` field is not required when
editing a command.
@mkrasnitski mkrasnitski deleted the edit-command branch November 13, 2024 00:56
GnomedDev pushed a commit to GnomedDev/serenity that referenced this pull request Nov 15, 2024
This separates the the builders for creating versus editing a command,
since it's not possible to change the `type` of a command (in serenity
this is the `kind` field). Also, the `name` field is not required when
editing a command.
mkrasnitski added a commit to mkrasnitski/serenity that referenced this pull request Dec 8, 2024
This separates the the builders for creating versus editing a command,
since it's not possible to change the `type` of a command (in serenity
this is the `kind` field). Also, the `name` field is not required when
editing a command.
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. model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants