Safe Haskell | None |
---|---|
Language | Haskell2010 |
Discord.Internal.Types.Interactions
Synopsis
- data Interaction
- = InteractionComponent {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- componentData :: ComponentData
- 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
- applicationCommandData :: ApplicationCommandData
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- | InteractionApplicationCommandAutocomplete {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- applicationCommandData :: ApplicationCommandData
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- | InteractionModalSubmit {
- interactionId :: InteractionId
- interactionApplicationId :: ApplicationId
- modalData :: ModalData
- interactionGuildId :: Maybe GuildId
- interactionChannelId :: Maybe ChannelId
- interactionUser :: MemberOrUser
- interactionToken :: InteractionToken
- interactionVersion :: Int
- interactionLocale :: Text
- interactionGuildLocale :: Maybe Text
- = InteractionComponent {
- data ComponentData
- = ButtonData { }
- | SelectMenuData { }
- data ApplicationCommandData
- data OptionsData
- data OptionDataSubcommandOrGroup
- data OptionDataSubcommand = OptionDataSubcommand {}
- data OptionDataValue
- = OptionDataValueString { }
- | OptionDataValueInteger { }
- | OptionDataValueBoolean { }
- | OptionDataValueUser { }
- | OptionDataValueChannel { }
- | OptionDataValueRole { }
- | OptionDataValueMentionable { }
- | OptionDataValueNumber { }
- type InteractionToken = DiscordToken InteractionIdType
- 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 [ActionRow]
- 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.
Constructors
InteractionComponent | |
Fields
| |
InteractionPing | |
Fields
| |
InteractionApplicationCommand | |
Fields
| |
InteractionApplicationCommandAutocomplete | |
Fields
| |
InteractionModalSubmit | |
Fields
|
Instances
Eq Interaction Source # | |
Defined in Discord.Internal.Types.Interactions | |
Ord Interaction Source # | |
Defined in Discord.Internal.Types.Interactions Methods compare :: Interaction -> Interaction -> Ordering # (<) :: Interaction -> Interaction -> Bool # (<=) :: Interaction -> Interaction -> Bool # (>) :: Interaction -> Interaction -> Bool # (>=) :: Interaction -> Interaction -> Bool # max :: Interaction -> Interaction -> Interaction # min :: Interaction -> Interaction -> Interaction # | |
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 ComponentData Source #
Constructors
ButtonData | |
Fields
| |
SelectMenuData | |
Fields
|
Instances
data ApplicationCommandData Source #
Constructors
ApplicationCommandDataUser | |
Fields
| |
ApplicationCommandDataMessage | |
Fields
| |
ApplicationCommandDataChatInput | |
Fields
|
Instances
data OptionsData Source #
Either subcommands and groups, or values.
Constructors
OptionsDataSubcommands [OptionDataSubcommandOrGroup] | |
OptionsDataValues [OptionDataValue] |
Instances
Eq OptionsData Source # | |
Defined in Discord.Internal.Types.Interactions | |
Ord OptionsData Source # | |
Defined in Discord.Internal.Types.Interactions Methods compare :: OptionsData -> OptionsData -> Ordering # (<) :: OptionsData -> OptionsData -> Bool # (<=) :: OptionsData -> OptionsData -> Bool # (>) :: OptionsData -> OptionsData -> Bool # (>=) :: OptionsData -> OptionsData -> Bool # max :: OptionsData -> OptionsData -> OptionsData # min :: OptionsData -> OptionsData -> OptionsData # | |
Read OptionsData Source # | |
Defined in Discord.Internal.Types.Interactions Methods readsPrec :: Int -> ReadS OptionsData # readList :: ReadS [OptionsData] # readPrec :: ReadPrec OptionsData # readListPrec :: ReadPrec [OptionsData] # | |
Show OptionsData Source # | |
Defined in Discord.Internal.Types.Interactions Methods showsPrec :: Int -> OptionsData -> ShowS # show :: OptionsData -> String # showList :: [OptionsData] -> ShowS # | |
FromJSON OptionsData Source # | |
Defined in Discord.Internal.Types.Interactions |
data OptionDataSubcommandOrGroup Source #
Either a subcommand group or a subcommand.
Instances
data OptionDataSubcommand Source #
Data for a single subcommand.
Constructors
OptionDataSubcommand | |
Instances
data OptionDataValue Source #
Data for a single value.
Constructors
OptionDataValueString | |
Fields | |
OptionDataValueInteger | |
Fields | |
OptionDataValueBoolean | |
Fields | |
OptionDataValueUser | |
Fields | |
OptionDataValueChannel | |
Fields | |
OptionDataValueRole | |
Fields | |
OptionDataValueMentionable | |
Fields | |
OptionDataValueNumber | |
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 | |
Instances
newtype MemberOrUser Source #
Constructors
MemberOrUser (Either GuildMember User) |
Instances
Eq MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions | |
Ord MemberOrUser Source # | |
Defined in Discord.Internal.Types.Interactions Methods compare :: MemberOrUser -> MemberOrUser -> Ordering # (<) :: MemberOrUser -> MemberOrUser -> Bool # (<=) :: MemberOrUser -> MemberOrUser -> Bool # (>) :: MemberOrUser -> MemberOrUser -> Bool # (>=) :: MemberOrUser -> MemberOrUser -> Bool # max :: MemberOrUser -> MemberOrUser -> MemberOrUser # min :: MemberOrUser -> MemberOrUser -> MemberOrUser # | |
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 |
InteractionResponseModal InteractionResponseModalData | respond with a popup modal |
Instances
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 Number] |
Instances
data InteractionResponseMessage Source #
A cut down message structure.
Constructors
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.
Constructors
InteractionResponseMessageFlagEphermeral |
Instances
data InteractionResponseModalData Source #
Constructors
InteractionResponseModalData | |