diff --git a/src/builder/create_interaction_response.rs b/src/builder/create_interaction_response.rs index 0ad5520ca10..c73f168e784 100644 --- a/src/builder/create_interaction_response.rs +++ b/src/builder/create_interaction_response.rs @@ -308,6 +308,14 @@ impl AutocompleteChoice { } } +impl> From for AutocompleteChoice { + fn from(value: S) -> Self { + let value = value.into(); + let name = value.clone(); + Self::new(name, value) + } +} + /// [Discord docs](https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-autocomplete) #[derive(Clone, Debug, Default, Serialize)] #[must_use]