#[non_exhaustive]pub struct PromptOption {
pub id: GenericId,
pub channel_ids: Vec<ChannelId>,
pub role_ids: Vec<RoleId>,
pub emoji: Option<PartialEmoji>,
pub title: CompactString,
pub description: Option<CompactString>,
}Expand description
An answer of an onboarding prompt.
When creating or editing an option, Discord expects emoji_id/emoji_name/emoji_animated
instead of the emoji object received here.
discord.js counterpart: GuildOnboardingPromptOption.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: GenericIdThe option’s ID.
channel_ids: Vec<ChannelId>Channels the member is added to when choosing this option.
role_ids: Vec<RoleId>Roles the member gets when choosing this option.
emoji: Option<PartialEmoji>The option’s emoji.
title: CompactStringThe option’s title.
description: Option<CompactString>The option’s description.
Trait Implementations§
Source§impl Clone for PromptOption
impl Clone for PromptOption
Source§impl Debug for PromptOption
impl Debug for PromptOption
Source§impl<'de> Deserialize<'de> for PromptOption
impl<'de> Deserialize<'de> for PromptOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PromptOption
Source§impl From<PromptOption> for PromptOptionData
impl From<PromptOption> for PromptOptionData
Source§fn from(option: PromptOption) -> Self
fn from(option: PromptOption) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PromptOption
impl PartialEq for PromptOption
Source§impl Serialize for PromptOption
impl Serialize for PromptOption
impl StructuralPartialEq for PromptOption
Auto Trait Implementations§
impl Forget for PromptOption
impl Freeze for PromptOption
impl Move for PromptOption
impl RefUnwindSafe for PromptOption
impl Send for PromptOption
impl Sync for PromptOption
impl Unpin for PromptOption
impl UnsafeUnpin for PromptOption
impl UnwindSafe for PromptOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more