View Source Nostrum.Struct.ApplicationCommandInteractionData (Nostrum v0.10.0)

Struct for interaction data.

Summary

Types

For components, the type of the component

For Modal Sumbit interactions, this will contain the values the user submitted.

For components, the custom_id of the component

ID of the invoked command

Name of the invoked command

Parameters and values supplied by the user, if applicable

Converted users & roles & channels

For select menu components, this will be a list of the values the user selected.

t()

Command interaction data for slash commands.

ID of the user or message targeted by a context menu command

Types

Link to this type

component_type()

View Source (since 0.5.0)
@type component_type() :: integer() | nil

For components, the type of the component

Link to this type

components()

View Source (since 0.5.1)
@type components() :: [Nostrum.Struct.Message.Component.t()] | nil

For Modal Sumbit interactions, this will contain the values the user submitted.

Link to this type

custom_id()

View Source (since 0.5.0)
@type custom_id() :: String.t() | nil

For components, the custom_id of the component

@type id() :: Nostrum.Snowflake.t() | nil

ID of the invoked command

Link to this type

interaction_type()

View Source (since 0.5.0)
@type interaction_type() :: integer() | nil

The type of application command invoked. Official reference: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types

@type name() :: String.t() | nil

Name of the invoked command

Parameters and values supplied by the user, if applicable

Link to this type

resolved()

View Source (since 0.5.0)

Converted users & roles & channels

Link to this type

select_values()

View Source (since 0.5.0)
@type select_values() :: [String.t()] | nil

For select menu components, this will be a list of the values the user selected.

@type t() :: %Nostrum.Struct.ApplicationCommandInteractionData{
  component_type: component_type(),
  components: components(),
  custom_id: custom_id(),
  id: id(),
  name: name(),
  options: options(),
  resolved: resolved(),
  target_id: target_id(),
  type: interaction_type(),
  values: select_values()
}

Command interaction data for slash commands.

Used as part of Nostrum.Struct.Interaction.t/0.

Official reference: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object

Link to this type

target_id()

View Source (since 0.5.0)
@type target_id() :: Nostrum.Snowflake.t() | nil

ID of the user or message targeted by a context menu command