#[non_exhaustive]pub enum Interaction {
Ping(PingInteraction),
Command(CommandInteraction),
Autocomplete(CommandInteraction),
Component(ComponentInteraction),
Modal(ModalInteraction),
}
Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ping(PingInteraction)
Command(CommandInteraction)
Autocomplete(CommandInteraction)
Component(ComponentInteraction)
Modal(ModalInteraction)
Implementations§
Source§impl Interaction
impl Interaction
Sourcepub fn id(&self) -> InteractionId
pub fn id(&self) -> InteractionId
Gets the interaction Id.
Sourcepub fn kind(&self) -> InteractionType
pub fn kind(&self) -> InteractionType
Gets the interaction type
Sourcepub fn app_permissions(&self) -> Option<Permissions>
pub fn app_permissions(&self) -> Option<Permissions>
Permissions the app or bot has within the channel the interaction was sent from.
Sourcepub fn application_id(&self) -> ApplicationId
pub fn application_id(&self) -> ApplicationId
Gets the interaction application Id
Sourcepub fn guild_locale(&self) -> Option<&str>
pub fn guild_locale(&self) -> Option<&str>
Gets the invoked guild locale.
Sourcepub fn entitlements(&self) -> Option<&[Entitlement]>
pub fn entitlements(&self) -> Option<&[Entitlement]>
For monetized applications, gets the invoking user’s granted entitlements.
Sourcepub fn ping(self) -> Option<PingInteraction>
pub fn ping(self) -> Option<PingInteraction>
Converts this to a PingInteraction
Sourcepub fn as_ping(&self) -> Option<&PingInteraction>
pub fn as_ping(&self) -> Option<&PingInteraction>
Converts this to a PingInteraction
Sourcepub fn into_ping(self) -> Option<PingInteraction>
pub fn into_ping(self) -> Option<PingInteraction>
Converts this to a PingInteraction
Sourcepub fn command(self) -> Option<CommandInteraction>
pub fn command(self) -> Option<CommandInteraction>
Converts this to an CommandInteraction
Sourcepub fn as_command(&self) -> Option<&CommandInteraction>
pub fn as_command(&self) -> Option<&CommandInteraction>
Converts this to an CommandInteraction
Sourcepub fn into_command(self) -> Option<CommandInteraction>
pub fn into_command(self) -> Option<CommandInteraction>
Converts this to an CommandInteraction
Sourcepub fn message_component(self) -> Option<ComponentInteraction>
pub fn message_component(self) -> Option<ComponentInteraction>
Converts this to a ComponentInteraction
Sourcepub fn as_message_component(&self) -> Option<&ComponentInteraction>
pub fn as_message_component(&self) -> Option<&ComponentInteraction>
Converts this to a ComponentInteraction
Sourcepub fn into_message_component(self) -> Option<ComponentInteraction>
pub fn into_message_component(self) -> Option<ComponentInteraction>
Converts this to a ComponentInteraction
Sourcepub fn autocomplete(self) -> Option<CommandInteraction>
pub fn autocomplete(self) -> Option<CommandInteraction>
Converts this to a CommandInteraction
Sourcepub fn as_autocomplete(&self) -> Option<&CommandInteraction>
pub fn as_autocomplete(&self) -> Option<&CommandInteraction>
Converts this to a CommandInteraction
Sourcepub fn into_autocomplete(self) -> Option<CommandInteraction>
pub fn into_autocomplete(self) -> Option<CommandInteraction>
Converts this to a CommandInteraction
Sourcepub fn modal_submit(self) -> Option<ModalInteraction>
pub fn modal_submit(self) -> Option<ModalInteraction>
Converts this to a ModalInteraction
Sourcepub fn as_modal_submit(&self) -> Option<&ModalInteraction>
pub fn as_modal_submit(&self) -> Option<&ModalInteraction>
Converts this to a ModalInteraction
Sourcepub fn into_modal_submit(self) -> Option<ModalInteraction>
pub fn into_modal_submit(self) -> Option<ModalInteraction>
Converts this to a ModalInteraction
Trait Implementations§
Source§impl Clone for Interaction
impl Clone for Interaction
Source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more