Remedy.Struct.Interaction (Remedy v0.5.2) View Source
Slash command invocation struct.
Link to this section Summary
Types
ID of the application that this interaction is for
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, if invoked on a guild
For components, the message they were attached to
A command invocation for slash commands.
Continuation token for responses
Interaction kind.
User object for the invoking user, if invoked via a DM
Version identifier, always 1
Link to this section Types
Specs
application_id() :: Sunbake.Snowflake.t()
ID of the application that this interaction is for
Specs
channel_id() :: Remedy.Struct.Channel.id()
ID of the channel where the command was invoked
Specs
data() :: Remedy.Struct.ApplicationCommandInteractionData.t() | nil
Invocation data.
Only present for ApplicationCommand interactions, that is, type=2
.
Specs
guild_id() :: Remedy.Struct.Guild.id() | nil
ID of the guild where the command was invoked
Specs
id() :: Sunbake.Snowflake.t()
Interaction identifier
Specs
member() :: Remedy.Struct.Guild.Member.t() | nil
Member information about the invoker, if invoked on a guild
Specs
message() :: Remedy.Struct.Message.t() | nil
For components, the message they were attached to
Specs
t() :: %Remedy.Struct.Interaction{ application_id: application_id(), channel_id: channel_id(), data: data(), guild_id: guild_id(), id: id(), member: member(), message: message(), token: token(), type: type(), user: user(), 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
user() :: Remedy.Struct.User.t() | nil
User object for the invoking user, if invoked via a DM
Specs
version() :: pos_integer()
Version identifier, always 1