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

Struct for interaction data.

Link to this section 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

Link to this section Types

Link to this type

component_type()

View Source (since 0.5.0)

Specs

component_type() :: integer() | nil

For components, the type of the component

Link to this type

components()

View Source (since 0.5.1)

Specs

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)

Specs

custom_id() :: String.t() | nil

For components, the custom_id of the component

Specs

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

ID of the invoked command

Link to this type

interaction_type()

View Source (since 0.5.0)

Specs

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

Specs

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

Name of the invoked command

Specs

Parameters and values supplied by the user, if applicable

Link to this type

resolved()

View Source (since 0.5.0)

Specs

Converted users & roles & channels

Link to this type

select_values()

View Source (since 0.5.0)

Specs

select_values() :: [String.t()] | nil

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

Specs

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)

Specs

target_id() :: Nostrum.Snowflake.t() | nil

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