From ab68bfb60e643cf950c05257be41ebdbdaf4ef55 Mon Sep 17 00:00:00 2001 From: Archer Date: Sun, 25 Jun 2023 16:07:22 +0200 Subject: [PATCH] docs(twilight-model)!: Streamline select menu documentation This commit streamlines the language in the `SelectMenu` and `SelectMenuType` documentation. In particular, it removes duplicated sections outlining required and optional fields. Moreover, it makes language describing which menu types use a specific option more in line with the rest of the library. --- .../src/channel/message/component/select_menu.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/twilight-model/src/channel/message/component/select_menu.rs b/twilight-model/src/channel/message/component/select_menu.rs index 27945c6ea5c..1cdb338f039 100644 --- a/twilight-model/src/channel/message/component/select_menu.rs +++ b/twilight-model/src/channel/message/component/select_menu.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; pub struct SelectMenu { /// An optional list of channel types. /// - /// This option is only used for [channel select menus](SelectMenuType::Channel). + /// This is only applicable to [channel select menus](SelectMenuType::Channel). pub channel_types: Option>, /// Developer defined identifier. pub custom_id: String, @@ -17,8 +17,6 @@ pub struct SelectMenu { /// Defaults to `false`. pub disabled: bool, /// This select menu's type. - /// - /// [Text select menus](SelectMenuType::Text) *must* also set the `options` field. pub kind: SelectMenuType, /// Maximum number of options that may be chosen. pub max_values: Option, @@ -26,7 +24,7 @@ pub struct SelectMenu { pub min_values: Option, /// A list of available options. /// - /// This value is only used and required by [text select menus](SelectMenuType::Text). + /// This is required by [text select menus](SelectMenuType::Text). pub options: Option>, /// Custom placeholder text if no option is selected. pub placeholder: Option, @@ -48,9 +46,6 @@ pub enum SelectMenuType { /// Mentionable select menus. Mentionable, /// Channel select menus. - /// - /// Select menus of this `kind` *can* use the `channel_types` field to specify which types of - /// channels are selectable. Channel, }