Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
Instances
Eq Interaction Source # | |
Defined in Discord.Internal.Types.Interactions (==) :: Interaction -> Interaction -> Bool # (/=) :: Interaction -> Interaction -> Bool # | |
Read Interaction Source # | |
Defined in Discord.Internal.Types.Interactions readsPrec :: Int -> ReadS Interaction # readList :: ReadS [Interaction] # readPrec :: ReadPrec Interaction # readListPrec :: ReadPrec [Interaction] # | |
Show Interaction Source # | |
Defined in Discord.Internal.Types.Interactions showsPrec :: Int -> Interaction -> ShowS # show :: Interaction -> String # showList :: [Interaction] -> ShowS # | |
Internals Interaction InternalInteraction Source # | |
data InteractionDataComponent Source #
InteractionDataComponentButton | |
| |
InteractionDataComponentSelectMenu | |
|
Instances
data InteractionDataApplicationCommand Source #
data InteractionDataApplicationCommandOptions Source #
Instances
data InteractionDataApplicationCommandOptionSubcommandOrGroup Source #
InteractionDataApplicationCommandOptionSubcommandGroup | |
InteractionDataApplicationCommandOptionSubcommandOrGroupSubcommand InteractionDataApplicationCommandOptionSubcommand |
Instances
data InteractionDataApplicationCommandOptionSubcommand Source #
Instances
data InteractionDataApplicationCommandOptionValue Source #
Instances
data ApplicationCommandInteractionDataValue Source #
Instances
data InternalInteraction Source #
This is the data that is recieved when an interaction occurs.
Instances
Eq InternalInteraction Source # | |
Defined in Discord.Internal.Types.Interactions (==) :: InternalInteraction -> InternalInteraction -> Bool # (/=) :: InternalInteraction -> InternalInteraction -> Bool # | |
Read InternalInteraction Source # | |
Show InternalInteraction Source # | |
Defined in Discord.Internal.Types.Interactions showsPrec :: Int -> InternalInteraction -> ShowS # show :: InternalInteraction -> String # showList :: [InternalInteraction] -> ShowS # | |
ToJSON InternalInteraction Source # | |
Defined in Discord.Internal.Types.Interactions toJSON :: InternalInteraction -> Value # toEncoding :: InternalInteraction -> Encoding # toJSONList :: [InternalInteraction] -> Value # toEncodingList :: [InternalInteraction] -> Encoding # | |
FromJSON InternalInteraction Source # | |
Defined in Discord.Internal.Types.Interactions parseJSON :: Value -> Parser InternalInteraction # parseJSONList :: Value -> Parser [InternalInteraction] # | |
Internals Interaction InternalInteraction Source # | |
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.
InternalInteractionData | |
|
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.
Instances
Eq ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions (==) :: ResolvedData -> ResolvedData -> Bool # (/=) :: ResolvedData -> ResolvedData -> Bool # | |
Read ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions readsPrec :: Int -> ReadS ResolvedData # readList :: ReadS [ResolvedData] # | |
Show ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions showsPrec :: Int -> ResolvedData -> ShowS # show :: ResolvedData -> String # showList :: [ResolvedData] -> ShowS # | |
ToJSON ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions toJSON :: ResolvedData -> Value # toEncoding :: ResolvedData -> Encoding # toJSONList :: [ResolvedData] -> Value # toEncodingList :: [ResolvedData] -> Encoding # | |
FromJSON ResolvedData Source # | |
Defined in Discord.Internal.Types.Interactions parseJSON :: Value -> Parser ResolvedData # parseJSONList :: Value -> Parser [ResolvedData] # |
data InternalInteractionDataApplicationCommandOption Source #
The application command payload for an interaction.
InternalInteractionDataApplicationCommandOption | |
|
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.
Instances
Eq InteractionResponse Source # | |
Defined in Discord.Internal.Types.Interactions (==) :: InteractionResponse -> InteractionResponse -> Bool # (/=) :: InteractionResponse -> InteractionResponse -> Bool # | |
Read InteractionResponse Source # | |
Show InteractionResponse Source # | |
Defined in Discord.Internal.Types.Interactions showsPrec :: Int -> InteractionResponse -> ShowS # show :: InteractionResponse -> String # showList :: [InteractionResponse] -> ShowS # | |
ToJSON InteractionResponse Source # | |
Defined in Discord.Internal.Types.Interactions toJSON :: InteractionResponse -> Value # toEncoding :: InteractionResponse -> Encoding # toJSONList :: [InteractionResponse] -> Value # toEncodingList :: [InteractionResponse] -> Encoding # |
data InteractionCallbackType Source #
What's the type of the response?
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.
InteractionCallbackDataMessages InteractionCallbackMessages | |
InteractionCallbackDataAutocomplete InteractionCallbackAutocomplete |
Instances
data InteractionCallbackMessages Source #
A cut down message structure.
Instances
newtype InteractionCallbackDataFlags Source #
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.