Safe Haskell | None |
---|---|
Language | Haskell2010 |
Discord.Internal.Types.Interactions
Synopsis
- data Interaction
- = InteractionComponent {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataComponent :: InteractionDataComponent
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionMessage :: Message
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- | InteractionPing { }
- | InteractionApplicationCommand {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataApplicationCommand :: InteractionDataApplicationCommand
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- | InteractionApplicationCommandAutocomplete {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataApplicationCommand :: InteractionDataApplicationCommand
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- | InteractionModalSubmit {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataModal :: InteractionDataModal
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- = InteractionComponent {
- data InteractionDataComponent
- data InteractionDataApplicationCommand
- data InteractionDataApplicationCommandOptions
- data InteractionDataApplicationCommandOptionSubcommandOrGroup
- data InteractionDataApplicationCommandOptionSubcommand = InteractionDataApplicationCommandOptionSubcommand {}
- data InteractionDataApplicationCommandOptionValue
- = InteractionDataApplicationCommandOptionValueString { }
- | InteractionDataApplicationCommandOptionValueInteger { }
- | InteractionDataApplicationCommandOptionValueBoolean { }
- | InteractionDataApplicationCommandOptionValueUser { }
- | InteractionDataApplicationCommandOptionValueChannel { }
- | InteractionDataApplicationCommandOptionValueRole { }
- | InteractionDataApplicationCommandOptionValueMentionable { }
- | InteractionDataApplicationCommandOptionValueNumber { }
- type InteractionToken = Text
- data ResolvedData = ResolvedData {}
- newtype MemberOrUser = MemberOrUser (Either GuildMember User)
- data InteractionResponse
- = InteractionResponsePong
- | InteractionResponseChannelMessage InteractionResponseMessage
- | InteractionResponseDeferChannelMessage
- | InteractionResponseDeferUpdateMessage
- | InteractionResponseUpdateMessage InteractionResponseMessage
- | InteractionResponseAutocompleteResult InteractionResponseAutocomplete
- | InteractionResponseModal InteractionResponseModalData
- interactionResponseBasic :: Text -> InteractionResponse
- data InteractionResponseAutocomplete
- data InteractionResponseMessage = InteractionResponseMessage {
- interactionResponseMessageTTS :: Maybe Bool
- interactionResponseMessageContent :: Maybe Text
- interactionResponseMessageEmbeds :: Maybe [CreateEmbed]
- interactionResponseMessageAllowedMentions :: Maybe AllowedMentions
- interactionResponseMessageFlags :: Maybe InteractionResponseMessageFlags
- interactionResponseMessageComponents :: Maybe [ComponentActionRow]
- interactionResponseMessageAttachments :: Maybe [Attachment]
- interactionResponseMessageBasic :: Text -> InteractionResponseMessage
- newtype InteractionResponseMessageFlags = InteractionResponseMessageFlags [InteractionResponseMessageFlag]
- data InteractionResponseMessageFlag = InteractionResponseMessageFlagEphermeral
- data InteractionResponseModalData = InteractionResponseModalData {}
Documentation
data Interaction Source #
An interaction received from discord.
Constructors
InteractionComponent | |
Fields
| |
InteractionPing | |
Fields
| |
InteractionApplicationCommand | |
Fields
| |
InteractionApplicationCommandAutocomplete | |
Fields
| |
InteractionModalSubmit | |
Fields
|
Instances
Eq Interaction Source # | |
Defined in Discord.Internal.Types.Interactions | |
Ord Interaction Source # | |
Defined in Discord.Internal.Types.Interactions Methods compare :: Interaction -> Interaction -> Ordering # (<) :: Interaction -> Interaction -> Bool # (<=) :: Interaction -> Interaction -> Bool # (>) :: Interaction -> Interaction -> Bool # (>=) :: Interaction -> Interaction -> Bool # max :: Interaction -> Interaction -> Interaction # min :: Interaction -> Interaction -> Interaction # | |
Read Interaction Source # | |
Defined in Discord.Internal.Types.Interactions Methods readsPrec :: Int -> ReadS Interaction # readList :: ReadS [Interaction] # readPrec :: ReadPrec Interaction # readListPrec :: ReadPrec [Interaction] # | |
Show Interaction Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> Interaction -> ShowS # show :: Interaction -> String # showList :: [Interaction] -> ShowS # | |
FromJSON Interaction Source # | |
Defined in Discord.Internal.Types.Interactions |
data InteractionDataComponent Source #
Constructors
InteractionDataComponentButton | |
Fields
| |
InteractionDataComponentSelectMenu | |
Fields
|
Instances
data InteractionDataApplicationCommand Source #
Constructors
Instances
data InteractionDataApplicationCommandOptions Source #
Either subcommands and groups, or values.
Constructors
Instances
data InteractionDataApplicationCommandOptionSubcommandOrGroup Source #
Either a subcommand group or a subcommand.
Constructors
InteractionDataApplicationCommandOptionSubcommandGroup | |
InteractionDataApplicationCommandOptionSubcommandOrGroupSubcommand InteractionDataApplicationCommandOptionSubcommand |
Instances
data InteractionDataApplicationCommandOptionSubcommand Source #
Data for a single subcommand.
Instances
data InteractionDataApplicationCommandOptionValue Source #
Data for a single value.
Constructors
Instances
type InteractionToken = Text Source #
data ResolvedData Source #
I'm not sure what this stuff is, so you're on your own.
It's not worth the time working out how to create this stuff. If you need to extract from these values, check out the link below.
Constructors
ResolvedData | |
Instances
newtype MemberOrUser Source #
Constructors
MemberOrUser (Either GuildMember User) |
Instances
Eq MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions | |
Ord MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions Methods compare :: MemberOrUser -> MemberOrUser -> Ordering # (<) :: MemberOrUser -> MemberOrUser -> Bool # (<=) :: MemberOrUser -> MemberOrUser -> Bool # (>) :: MemberOrUser -> MemberOrUser -> Bool # (>=) :: MemberOrUser -> MemberOrUser -> Bool # max :: MemberOrUser -> MemberOrUser -> MemberOrUser # min :: MemberOrUser -> MemberOrUser -> MemberOrUser # | |
Read MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions Methods readsPrec :: Int -> ReadS MemberOrUser # readList :: ReadS [MemberOrUser] # | |
Show MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> MemberOrUser -> ShowS # show :: MemberOrUser -> String # showList :: [MemberOrUser] -> ShowS # | |
FromJSON MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions |
data InteractionResponse Source #
The data to respond to an interaction with. Unless specified otherwise, you only have three seconds to reply to an interaction before a failure state is given.
Constructors
InteractionResponsePong | ACK a Ping |
InteractionResponseChannelMessage InteractionResponseMessage | Respond to an interaction with a message |
InteractionResponseDeferChannelMessage | ACK an interaction and edit a response later (use |
InteractionResponseDeferUpdateMessage | for components, ACK an interaction and edit the original message later; the user does not see a loading state. |
InteractionResponseUpdateMessage InteractionResponseMessage | for components, edit the message the component was attached to |
InteractionResponseAutocompleteResult InteractionResponseAutocomplete | respond to an autocomplete interaction with suggested choices |
InteractionResponseModal InteractionResponseModalData | respond with a popup modal |
Instances
interactionResponseBasic :: Text -> InteractionResponse Source #
A basic interaction response, sending back the given text.
data InteractionResponseAutocomplete Source #
Constructors
InteractionResponseAutocompleteString [Choice Text] | |
InteractionResponseAutocompleteInteger [Choice Integer] | |
InteractionResponseAutocompleteNumber [Choice Scientific] |
Instances
data InteractionResponseMessage Source #
A cut down message structure.
Constructors
Instances
interactionResponseMessageBasic :: Text -> InteractionResponseMessage Source #
A basic interaction response, sending back the given text. This is effectively a helper function.
newtype InteractionResponseMessageFlags Source #
Instances
data InteractionResponseMessageFlag Source #
Types of flags to attach to the interaction message.
Currently the only flag is EPHERMERAL, which means only the user can see the message.
Constructors
InteractionResponseMessageFlagEphermeral |
Instances
data InteractionResponseModalData Source #
Constructors
InteractionResponseModalData | |