Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
InteractionComponent | |
| |
InteractionPing | |
| |
InteractionApplicationCommand | |
| |
InteractionApplicationCommandAutocomplete | |
|
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 # | |
FromJSON Interaction Source # | |
Defined in Discord.Internal.Types.Interactions parseJSON :: Value -> Parser Interaction # parseJSONList :: Value -> Parser [Interaction] # |
data InteractionDataComponent Source #
InteractionDataComponentButton | |
| |
InteractionDataComponentSelectMenu | |
|
Instances
data InteractionDataApplicationCommand Source #
data InteractionDataApplicationCommandOptions Source #
Either subcommands and groups, or values.
data InteractionDataApplicationCommandOptionSubcommandOrGroup Source #
Either a subcommand group or a subcommand.
InteractionDataApplicationCommandOptionSubcommandGroup | |
InteractionDataApplicationCommandOptionSubcommandOrGroupSubcommand InteractionDataApplicationCommandOptionSubcommand |
Instances
data InteractionDataApplicationCommandOptionSubcommand Source #
Data for a single subcommand.
Instances
data InteractionDataApplicationCommandOptionValue Source #
Data for a single value.
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.
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] # |
newtype MemberOrUser Source #
Instances
Eq MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions (==) :: MemberOrUser -> MemberOrUser -> Bool # (/=) :: MemberOrUser -> MemberOrUser -> Bool # | |
Read MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions readsPrec :: Int -> ReadS MemberOrUser # readList :: ReadS [MemberOrUser] # | |
Show MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions showsPrec :: Int -> MemberOrUser -> ShowS # show :: MemberOrUser -> String # showList :: [MemberOrUser] -> ShowS # | |
FromJSON MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions parseJSON :: Value -> Parser MemberOrUser # parseJSONList :: Value -> Parser [MemberOrUser] # |
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.
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 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 #
InteractionResponseAutocompleteString [Choice Text] | |
InteractionResponseAutocompleteInteger [Choice Integer] | |
InteractionResponseAutocompleteNumber [Choice Scientific] |
data InteractionResponseMessage Source #
A cut down message structure.
Instances
interactionResponseMessageBasic :: Text -> InteractionResponseMessage Source #
A basic interaction response, sending back the given text. This is effectively a helper function.
newtype InteractionResponseMessageFlags Source #
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.