pub struct Interaction {Show 19 fields
pub app_permissions: Option<Permissions>,
pub application_id: Id<ApplicationMarker>,
pub attachment_size_limit: u64,
pub authorizing_integration_owners: ApplicationIntegrationMap<AnonymizableId<GuildMarker>, Id<UserMarker>>,
pub channel: Option<Channel>,
pub channel_id: Option<Id<ChannelMarker>>,
pub context: Option<InteractionContextType>,
pub data: Option<InteractionData>,
pub entitlements: Vec<Entitlement>,
pub guild: Option<InteractionPartialGuild>,
pub guild_id: Option<Id<GuildMarker>>,
pub guild_locale: Option<String>,
pub id: Id<InteractionMarker>,
pub kind: InteractionType,
pub locale: Option<String>,
pub member: Option<PartialMember>,
pub message: Option<Message>,
pub token: String,
pub user: Option<User>,
}Expand description
Payload received when a user executes an interaction.
Fields§
§app_permissions: Option<Permissions>App’s permissions in the channel the interaction was sent from.
application_id: Id<ApplicationMarker>ID of the associated application.
attachment_size_limit: u64Maximum file size in bytes the user may upload in this interaction.
Computed by Discord per-interaction as the maximum of the user’s upload cap (e.g. Nitro) and the guild’s boost-tier cap.
Mapping of installation contexts that the interaction was authorized for to related user or guild IDs.
channel: Option<Channel>The channel the interaction was invoked in.
Present on all interactions types, except Ping.
channel_id: Option<Id<ChannelMarker>>channel_id is deprecated in the discord API and will no be sent in the future, users should use the channel field instead.
ID of the channel the interaction was invoked in.
Present on all interactions types, except Ping.
context: Option<InteractionContextType>Context where the interaction was triggered from.
data: Option<InteractionData>Data from the interaction.
This field present on ApplicationCommand, MessageComponent,
ApplicationCommandAutocomplete and ModalSubmit interactions.
The inner enum variant matches the interaction type.
entitlements: Vec<Entitlement>For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
guild: Option<InteractionPartialGuild>Guild that the interaction was sent from.
guild_id: Option<Id<GuildMarker>>ID of the guild the interaction was invoked in.
guild_locale: Option<String>Guild’s preferred locale.
Present when the interaction is invoked in a guild.
id: Id<InteractionMarker>ID of the interaction.
kind: InteractionTypeType of interaction.
locale: Option<String>Selected language of the user who invoked the interaction.
Present on all interactions types, except Ping.
member: Option<PartialMember>Member that invoked the interaction.
Present when the interaction is invoked in a guild.
message: Option<Message>Message attached to the interaction.
Present on MessageComponent interactions.
token: StringToken for responding to the interaction.
user: Option<User>User that invoked the interaction.
Present when the interaction is invoked in a direct message.
Implementations§
Source§impl Interaction
impl Interaction
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