| 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
- = 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
- 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
Documentation
data Interaction Source #
An interaction received from discord.
Constructors
| InteractionComponent | |
Fields
| |
| InteractionPing | |
Fields
| |
| InteractionApplicationCommand | |
Fields
| |
| InteractionApplicationCommandAutocomplete | |
Fields
| |
Instances
| Eq Interaction Source # | |
Defined in Discord.Internal.Types.Interactions | |
| 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
| Eq InteractionDataComponent Source # | |
Defined in Discord.Internal.Types.Interactions Methods (==) :: InteractionDataComponent -> InteractionDataComponent -> Bool # (/=) :: InteractionDataComponent -> InteractionDataComponent -> Bool # | |
| Read InteractionDataComponent Source # | |
Defined in Discord.Internal.Types.Interactions | |
| Show InteractionDataComponent Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> InteractionDataComponent -> ShowS # show :: InteractionDataComponent -> String # showList :: [InteractionDataComponent] -> ShowS # | |
| FromJSON InteractionDataComponent Source # | |
Defined in Discord.Internal.Types.Interactions Methods parseJSON :: Value -> Parser InteractionDataComponent # parseJSONList :: Value -> Parser [InteractionDataComponent] # | |
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
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 | |
Fields | |
Instances
| Eq ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions | |
| Read ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions Methods readsPrec :: Int -> ReadS ResolvedData # readList :: ReadS [ResolvedData] # | |
| Show ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> ResolvedData -> ShowS # show :: ResolvedData -> String # showList :: [ResolvedData] -> ShowS # | |
| ToJSON ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions Methods toJSON :: ResolvedData -> Value # toEncoding :: ResolvedData -> Encoding # toJSONList :: [ResolvedData] -> Value # toEncodingList :: [ResolvedData] -> Encoding # | |
| FromJSON ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions | |
newtype MemberOrUser Source #
Constructors
| MemberOrUser (Either GuildMember User) |
Instances
| Eq MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions | |
| 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 |
Instances
| ToJSON InteractionResponse Source # | |
Defined in Discord.Internal.Types.Interactions Methods toJSON :: InteractionResponse -> Value # toEncoding :: InteractionResponse -> Encoding # toJSONList :: [InteractionResponse] -> Value # toEncodingList :: [InteractionResponse] -> Encoding # | |
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
| Eq InteractionResponseMessage Source # | |
Defined in Discord.Internal.Types.Interactions Methods (==) :: InteractionResponseMessage -> InteractionResponseMessage -> Bool # (/=) :: InteractionResponseMessage -> InteractionResponseMessage -> Bool # | |
| Show InteractionResponseMessage Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> InteractionResponseMessage -> ShowS # show :: InteractionResponseMessage -> String # showList :: [InteractionResponseMessage] -> ShowS # | |
| ToJSON InteractionResponseMessage Source # | |
Defined in Discord.Internal.Types.Interactions Methods toJSON :: InteractionResponseMessage -> Value # toEncoding :: InteractionResponseMessage -> Encoding # toJSONList :: [InteractionResponseMessage] -> Value # toEncodingList :: [InteractionResponseMessage] -> Encoding # | |
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 |