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

feat(model): Add various From implementations for CommandOptionValue #2413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Erk-
Copy link
Member

@Erk- Erk- commented Jan 28, 2025

We skip a couple that I don't think makes sense (Focused, SubCommand, and SubCommandGroup)

Closes #2403

@github-actions github-actions bot added c-model Affects the model crate t-feature Addition of a new feature labels Jan 28, 2025
@Erk- Erk- force-pushed the erk/feat/model/add-from-impl-for-commandoptionvalue branch from fc7aad5 to e77b081 Compare January 30, 2025 21:06

impl From<Id<GenericMarker>> for CommandOptionValue {
fn from(value: Id<GenericMarker>) -> Self {
CommandOptionValue::Mentionable(value)
Copy link

Choose a reason for hiding this comment

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

It might be a good idea to exclude this one? Since things other than mentionables could be provided.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you not always have the specific type in those cases, GenericMarker is not used that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-model Affects the model crate t-feature Addition of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: From<i64> and From<f64> for CommandOptionValue
3 participants