Skip to main content

Module interaction

Module interaction 

Source
Expand description

Interactions: what a user does with an app (commands, components, modals), and the app’s responses.

An Interaction holds the fields every interaction has, and its data is an enum keyed by the interaction type (D-067). InteractionResponse is what the app sends back (D-068).

Structs§

ActivityInstanceResource
The Activity instance a LaunchActivity response launched.
AuthorizingIntegrationOwners
The installations that authorized an interaction, keyed by IntegrationType.
AutocompleteCallbackData
The data of an autocomplete response: the suggested choices.
CallbackResource
The resource a response created.
CommandData
The data of a command interaction (and of an autocomplete interaction).
CommandDataOption
An option filled in by the user: its name and its value (by option type).
ComponentData
The data of a component interaction: which button or select menu was used, and what was selected.
DeferredCallbackData
The data of a deferred message response: only the flags of the message that follows.
Interaction
An interaction: a user used one of the app’s commands, components or modals (or Discord checks the app’s HTTP endpoint).
InteractionCallback
The interaction a callback response belongs to.
InteractionCallbackResponse
The callback response Discord returns for a response sent with with_response=true.
InteractionChannel
The partial channel an interaction was triggered in, or a channel in Resolved data (D-051): the fields Discord sends there, plus the invoking member’s permissions in it.
InteractionGuild
The partial guild an interaction was triggered in (D-051).
InteractionMember
A member in an interaction: the invoking member (with its user) or a member in Resolved data (without user), together with their permissions in the channel.
MessageCallbackData
The message data of a response: a new message (ChannelMessageWithSource) or the edit of the component’s message (UpdateMessage).
MessageInteraction
The interaction a message responds to (Message::interaction).
ModalCallbackData
The data of a modal response: the popup’s ID, title and components.
ModalSubmitData
The data of a modal-submit interaction: the values the user entered in the modal’s components.
Resolved
The resolved data of an interaction: the objects behind the IDs in options, select menus and file uploads, keyed by ID (D-058).
SubmittedActionRow
A submitted action row.
SubmittedCheckbox
A submitted checkbox.
SubmittedEntitySelect
A submitted user, role, mentionable or channel select menu: the IDs of the selected entities, whose objects are in ModalSubmitData::resolved.
SubmittedFileUpload
A submitted file upload: the IDs of the uploaded files, whose objects are in Resolved::attachments.
SubmittedLabel
A submitted label and the input inside it.
SubmittedRadioGroup
A submitted radio group.
SubmittedSelect
A submitted string select or checkbox group.
SubmittedTextDisplay
A submitted text display.
SubmittedTextInput
A submitted text input.
UnknownSubmittedComponent
A submitted component of a type this version does not know.

Enums§

AutocompleteChoices
Autocomplete suggestions, typed like the option being completed.
CommandOptionValue
The value of a CommandDataOption, by option type.
GuildInstallOwner
The owner of a guild install in AuthorizingIntegrationOwners.
InteractionCallbackType
The type of an interaction response.
InteractionContextType
Where an interaction can be used, or was triggered from.
InteractionData
The data of an Interaction, by interaction type (D-067).
InteractionResponse
An interaction response: how the app answers an Interaction, within 3 seconds, by POST /interactions/{id}/{token}/callback or as the body of the HTTP endpoint’s reply.
InteractionType
The type of an interaction.
Mentionable
A user or a role chosen in a mentionable option or select menu, with its resolved data.
SubmittedComponent
A submitted modal component: what the user entered, by component type.