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
- | 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.
InteractionComponent | |
| |
InteractionPing | |
| |
InteractionApplicationCommand | |
| |
InteractionApplicationCommandAutocomplete | |
| |
InteractionModalSubmit | |
|
Instances
data InteractionDataComponent Source #
InteractionDataComponentButton | |
| |
InteractionDataComponentSelectMenu | |
|
Instances
data InteractionDataApplicationCommand Source #
Instances
data InteractionDataApplicationCommandOptions Source #
Either subcommands and groups, or values.
Instances
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.
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.
Instances
newtype MemberOrUser Source #
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.
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 #
InteractionResponseAutocompleteString [Choice Text] | |
InteractionResponseAutocompleteInteger [Choice Integer] | |
InteractionResponseAutocompleteNumber [Choice Scientific] |
Instances
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 #
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.
Instances
data InteractionResponseModalData Source #