| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Discord.Internal.Types.Interactions
Synopsis
- data Interaction- = InteractionComponent { - interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataComponent :: Maybe InteractionDataComponent
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionMember :: Maybe GuildMember
- interactionUser :: Maybe User
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionMessage :: Message
 
- | InteractionPing { }
- | InteractionApplicationCommand { - interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataApplicationCommand :: Maybe InteractionDataApplicationCommand
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionMember :: Maybe GuildMember
- interactionUser :: Maybe User
- interactionToken :: InteractionToken
- interactionVersion :: Int
 
- | InteractionApplicationCommandAutocomplete { - interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- interactionDataApplicationCommand :: Maybe InteractionDataApplicationCommand
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionMember :: Maybe GuildMember
- interactionUser :: Maybe User
- interactionToken :: InteractionToken
- interactionVersion :: Int
 
- | InteractionUnknown InternalInteraction
 
- = InteractionComponent { 
- data InteractionDataComponent
- data InteractionDataApplicationCommand
- data InteractionDataApplicationCommandOptions
- data InteractionDataApplicationCommandOptionSubcommandOrGroup
- data InteractionDataApplicationCommandOptionSubcommand = InteractionDataApplicationCommandOptionSubcommand {}
- data InteractionDataApplicationCommandOptionValue = InteractionDataApplicationCommandOptionValue {}
- data ApplicationCommandInteractionDataValue- = ApplicationCommandInteractionDataValueString Text
- | ApplicationCommandInteractionDataValueInteger Integer
- | ApplicationCommandInteractionDataValueBoolean Bool
- | ApplicationCommandInteractionDataValueUser Snowflake
- | ApplicationCommandInteractionDataValueChannel Snowflake
- | ApplicationCommandInteractionDataValueRole Snowflake
- | ApplicationCommandInteractionDataValueMentionable Snowflake
- | ApplicationCommandInteractionDataValueNumber Scientific
 
- data InternalInteraction = InternalInteraction {- internalInteractionId :: InteractionId
- internalInteractionApplicationId :: ApplicationId
- internalInteractionType :: InteractionType
- internalInteractionData :: Maybe InternalInteractionData
- internalInteractionGuildId :: Maybe GuildId
- internalInteractionChannelId :: Maybe ChannelId
- internalInteractionMember :: Maybe GuildMember
- internalInteractionUser :: Maybe User
- internalInteractionToken :: InteractionToken
- internalInteractionVersion :: Int
- internalInteractionMessage :: Maybe Message
 
- type InteractionToken = Text
- data InteractionType
- data InternalInteractionData = InternalInteractionData {- internalInteractionDataApplicationCommandId :: Maybe ApplicationCommandId
- internalInteractionDataApplicationCommandName :: Maybe Text
- internalInteractionDataApplicationCommandType :: Maybe ApplicationCommandType
- internalInteractionDataResolved :: Maybe ResolvedData
- internalInteractionDataOptions :: Maybe [InternalInteractionDataApplicationCommandOption]
- internalInteractionDataCustomId :: Maybe Text
- internalInteractionDataComponentType :: Maybe ComponentType
- internalInteractionDataValues :: Maybe [Text]
- internalInteractionDataTargetId :: Maybe Snowflake
 
- data ResolvedData = ResolvedData {}
- data InternalInteractionDataApplicationCommandOption = InternalInteractionDataApplicationCommandOption {- internalInteractionDataApplicationCommandOptionName :: Text
- internalInteractionDataApplicationCommandOptionType :: ApplicationCommandOptionType
- internalInteractionDataApplicationCommandOptionValue :: Maybe ApplicationCommandInteractionDataValue
- internalInteractionDataApplicationCommandOptionOptions :: Maybe [InternalInteractionDataApplicationCommandOption]
- internalInteractionDataApplicationCommandOptionFocused :: Maybe Bool
 
- data InteractionResponse = InteractionResponse {}
- interactionResponseBasic :: Text -> InteractionResponse
- data InteractionCallbackType
- data InteractionCallbackData
- type InteractionCallbackAutocomplete = [InternalApplicationCommandOptionChoice]
- data InteractionCallbackMessages = InteractionCallbackMessages {- interactionCallbackMessagesTTS :: Maybe Bool
- interactionCallbackMessagesContent :: Maybe Text
- interactionCallbackMessagesEmbeds :: Maybe [Embed]
- interactionCallbackMessagesAllowedMentions :: Maybe AllowedMentions
- interactionCallbackMessagesFlags :: Maybe InteractionCallbackDataFlags
- interactionCallbackMessagesComponents :: Maybe [Component]
- interactionCallbackMessagesAttachments :: Maybe [Attachment]
 
- interactionCallbackMessagesBasic :: Text -> InteractionCallbackMessages
- newtype InteractionCallbackDataFlags = InteractionCallbackDataFlags [InteractionCallbackDataFlag]
- data InteractionCallbackDataFlag = InteractionCallbackDataFlagEphermeral
Documentation
data Interaction Source #
Constructors
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 # | |
| Internals Interaction InternalInteraction Source # | |
| Defined in Discord.Internal.Types.Interactions Methods toInternal :: Interaction -> InternalInteraction Source # fromInternal :: InternalInteraction -> Maybe Interaction Source # | |
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 # | |
| Internals InteractionDataComponent InternalInteractionData Source # | |
data InteractionDataApplicationCommand Source #
Constructors
Instances
data InteractionDataApplicationCommandOptions Source #
Constructors
Instances
data InteractionDataApplicationCommandOptionSubcommandOrGroup Source #
Constructors
| InteractionDataApplicationCommandOptionSubcommandGroup | |
| InteractionDataApplicationCommandOptionSubcommandOrGroupSubcommand InteractionDataApplicationCommandOptionSubcommand | |
Instances
data InteractionDataApplicationCommandOptionSubcommand Source #
Instances
data InteractionDataApplicationCommandOptionValue Source #
Constructors
| InteractionDataApplicationCommandOptionValue | |
Instances
data ApplicationCommandInteractionDataValue Source #
Constructors
Instances
data InternalInteraction Source #
This is the data that is recieved when an interaction occurs.
Constructors
Instances
type InteractionToken = Text Source #
data InteractionType Source #
What type of interaction has a user requested? Each requires its own type of response.
Instances
data InternalInteractionData Source #
This is received if the interaction was a component or application command.
Constructors
| InternalInteractionData | |
| Fields 
 | |
Instances
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 | |
data InternalInteractionDataApplicationCommandOption Source #
The application command payload for an interaction.
Constructors
| InternalInteractionDataApplicationCommandOption | |
| Fields 
 | |
Instances
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
| InteractionResponse | |
Instances
| Eq InteractionResponse Source # | |
| Defined in Discord.Internal.Types.Interactions Methods (==) :: InteractionResponse -> InteractionResponse -> Bool # (/=) :: InteractionResponse -> InteractionResponse -> Bool # | |
| Read InteractionResponse Source # | |
| Defined in Discord.Internal.Types.Interactions Methods readsPrec :: Int -> ReadS InteractionResponse # readList :: ReadS [InteractionResponse] # | |
| Show InteractionResponse Source # | |
| Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> InteractionResponse -> ShowS # show :: InteractionResponse -> String # showList :: [InteractionResponse] -> ShowS # | |
| ToJSON InteractionResponse Source # | |
| Defined in Discord.Internal.Types.Interactions Methods toJSON :: InteractionResponse -> Value # toEncoding :: InteractionResponse -> Encoding # toJSONList :: [InteractionResponse] -> Value # toEncodingList :: [InteractionResponse] -> Encoding # | |
data InteractionCallbackType Source #
What's the type of the response?
Constructors
| InteractionCallbackTypePong | Responds to a PING. | 
| InteractionCallbackTypeChannelMessageWithSource | Respond with a message to the interaction | 
| InteractionCallbackTypeDeferredChannelMessageWithSource | Respond with a message to the interaction, after a delay. Sending this back means the interaction token lasts for 15 minutes. | 
| InteractionCallbackTypeDeferredUpdateMessage | For components, edit the original message later. | 
| InteractionCallbackTypeUpdateMessage | For components, edit the original message. | 
| InteractionCallbackTypeApplicationCommandAutocompleteResult | Respond to an autocomplete interaction with suggested choices. | 
Instances
data InteractionCallbackData Source #
Convenience wrapper for two separate types of callback.
Constructors
| InteractionCallbackDataMessages InteractionCallbackMessages | |
| InteractionCallbackDataAutocomplete InteractionCallbackAutocomplete | 
Instances
| Eq InteractionCallbackData Source # | |
| Defined in Discord.Internal.Types.Interactions Methods (==) :: InteractionCallbackData -> InteractionCallbackData -> Bool # (/=) :: InteractionCallbackData -> InteractionCallbackData -> Bool # | |
| Read InteractionCallbackData Source # | |
| Defined in Discord.Internal.Types.Interactions | |
| Show InteractionCallbackData Source # | |
| Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> InteractionCallbackData -> ShowS # show :: InteractionCallbackData -> String # showList :: [InteractionCallbackData] -> ShowS # | |
| ToJSON InteractionCallbackData Source # | |
| Defined in Discord.Internal.Types.Interactions Methods toJSON :: InteractionCallbackData -> Value # toEncoding :: InteractionCallbackData -> Encoding # toJSONList :: [InteractionCallbackData] -> Value # | |
data InteractionCallbackMessages Source #
A cut down message structure.
Constructors
Instances
| Eq InteractionCallbackMessages Source # | |
| Defined in Discord.Internal.Types.Interactions Methods (==) :: InteractionCallbackMessages -> InteractionCallbackMessages -> Bool # (/=) :: InteractionCallbackMessages -> InteractionCallbackMessages -> Bool # | |
| Read InteractionCallbackMessages Source # | |
| Show InteractionCallbackMessages Source # | |
| Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> InteractionCallbackMessages -> ShowS # show :: InteractionCallbackMessages -> String # showList :: [InteractionCallbackMessages] -> ShowS # | |
| ToJSON InteractionCallbackMessages Source # | |
| Defined in Discord.Internal.Types.Interactions Methods toJSON :: InteractionCallbackMessages -> Value # toEncoding :: InteractionCallbackMessages -> Encoding # toJSONList :: [InteractionCallbackMessages] -> Value # toEncodingList :: [InteractionCallbackMessages] -> Encoding # | |
newtype InteractionCallbackDataFlags Source #
Constructors
| InteractionCallbackDataFlags [InteractionCallbackDataFlag] | 
Instances
data InteractionCallbackDataFlag 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
| InteractionCallbackDataFlagEphermeral |