Nostrum.Struct.Interaction (Nostrum v0.4.6) View Source
Slash command invocation struct.
Link to this section Summary
Types
ID of the channel where the command was invoked
Invocation data.
ID of the guild where the command was invoked
Interaction identifier
Member information about the invoker
A command invocation for slash commands.
Continuation token for responses
Interaction kind.
Version identifier, always 1
Link to this section Types
Specs
channel_id() :: Nostrum.Struct.Channel.id()
ID of the channel where the command was invoked
Specs
data() :: Nostrum.Struct.ApplicationCommandInteractionData.t() | nil
Invocation data.
Only present for ApplicationCommand interactions, that is, type=2
.
Specs
guild_id() :: Nostrum.Struct.Guild.id()
ID of the guild where the command was invoked
Specs
id() :: Nostrum.Snowflake.t()
Interaction identifier
Specs
member() :: Nostrum.Struct.Guild.Member.t()
Member information about the invoker
Specs
t() :: %Nostrum.Struct.Interaction{ channel_id: channel_id(), data: data(), guild_id: guild_id(), id: id(), member: member(), token: token(), type: type(), version: version() }
A command invocation for slash commands.
Official reference: https://discord.com/developers/docs/interactions/slash-commands#interaction
Specs
token() :: String.t()
Continuation token for responses
Specs
type() :: pos_integer()
Interaction kind.
1
for Ping2
for ApplicationCommand
Specs
version() :: pos_integer()
Version identifier, always 1