Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ApplicationCommand
- = ApplicationCommandUser { }
- | ApplicationCommandMessage { }
- | ApplicationCommandChatInput {
- applicationCommandId :: ApplicationCommandId
- applicationCommandApplicationId :: ApplicationId
- applicationCommandGuildId :: Maybe GuildId
- applicationCommandName :: Text
- applicationCommandDescription :: Text
- applicationCommandOptions :: Maybe ApplicationCommandOptions
- applicationCommandDefaultPermission :: Maybe Bool
- applicationCommandVersion :: Snowflake
- | ApplicationCommandUnknown InternalApplicationCommand
- data ApplicationCommandOptionSubcommandOrGroup
- data ApplicationCommandOptionSubcommand = ApplicationCommandOptionSubcommand {}
- data ApplicationCommandOptionValue
- = ApplicationCommandOptionValueString { }
- | ApplicationCommandOptionValueInteger {
- applicationCommandOptionValueName :: Text
- applicationCommandOptionValueDescription :: Text
- applicationCommandOptionValueRequired :: Maybe Bool
- applicationCommandOptionValueIntegerChoices :: Maybe [Choice Integer]
- applicationCommandOptionValueIntegerMinVal :: Maybe Integer
- applicationCommandOptionValueIntegerMaxVal :: Maybe Integer
- applicationCommandOptionValueAutocomplete :: Maybe Bool
- | ApplicationCommandOptionValueBoolean { }
- | ApplicationCommandOptionValueUser { }
- | ApplicationCommandOptionValueChannel { }
- | ApplicationCommandOptionValueRole { }
- | ApplicationCommandOptionValueMentionable { }
- | ApplicationCommandOptionValueNumber {
- applicationCommandOptionValueName :: Text
- applicationCommandOptionValueDescription :: Text
- applicationCommandOptionValueRequired :: Maybe Bool
- applicationCommandOptionValueNumberChoices :: Maybe [Choice Scientific]
- applicationCommandOptionValueNumberMinVal :: Maybe Scientific
- applicationCommandOptionValueNumberMaxVal :: Maybe Scientific
- applicationCommandOptionValueAutocomplete :: Maybe Bool
- data InternalApplicationCommand = InternalApplicationCommand {
- internalApplicationCommandId :: ApplicationCommandId
- internalApplicationCommandType :: Maybe ApplicationCommandType
- internalApplicationCommandApplicationId :: ApplicationId
- internalApplicationCommandGuildId :: Maybe GuildId
- internalApplicationCommandName :: Text
- internalApplicationCommandDescription :: Text
- internalApplicationCommandOptions :: Maybe [InternalApplicationCommandOption]
- internalApplicationCommandDefaultPermission :: Maybe Bool
- internalApplicationCommandVersion :: Snowflake
- data CreateApplicationCommand = CreateApplicationCommand {}
- createApplicationCommandChatInput :: Text -> Text -> Maybe CreateApplicationCommand
- createApplicationCommandUser :: Text -> Maybe CreateApplicationCommand
- createApplicationCommandMessage :: Text -> Maybe CreateApplicationCommand
- data EditApplicationCommand = EditApplicationCommand {}
- data ApplicationCommandType
- data InternalApplicationCommandOption = InternalApplicationCommandOption {
- internalApplicationCommandOptionType :: ApplicationCommandOptionType
- internalApplicationCommandOptionName :: Text
- internalApplicationCommandOptionDescription :: Text
- internalApplicationCommandOptionRequired :: Maybe Bool
- internalApplicationCommandOptionChoices :: Maybe [InternalApplicationCommandOptionChoice]
- internalApplicationCommandOptionOptions :: Maybe [InternalApplicationCommandOption]
- internalApplicationCommandOptionChannelTypes :: Maybe [ApplicationCommandChannelType]
- internalApplicationCommandOptionMinVal :: Maybe Scientific
- internalApplicationCommandOptionMaxVal :: Maybe Scientific
- internalApplicationCommandOptionAutocomplete :: Maybe Bool
- data ApplicationCommandOptionType
- = ApplicationCommandOptionTypeSubcommand
- | ApplicationCommandOptionTypeSubcommandGroup
- | ApplicationCommandOptionTypeString
- | ApplicationCommandOptionTypeInteger
- | ApplicationCommandOptionTypeBoolean
- | ApplicationCommandOptionTypeUser
- | ApplicationCommandOptionTypeChannel
- | ApplicationCommandOptionTypeRole
- | ApplicationCommandOptionTypeMentionable
- | ApplicationCommandOptionTypeNumber
- type InternalApplicationCommandOptionChoice = Choice StringNumberValue
- data Choice a = Choice {
- choiceName :: Text
- choiceValue :: a
- data ApplicationCommandChannelType
- = ApplicationCommandChannelTypeGuildText
- | ApplicationCommandChannelTypeDM
- | ApplicationCommandChannelTypeGuildVoice
- | ApplicationCommandChannelTypeGroupDM
- | ApplicationCommandChannelTypeGuildCategory
- | ApplicationCommandChannelTypeGuildNews
- | ApplicationCommandChannelTypeGuildStore
- | ApplicationCommandChannelTypeGuildNewsThread
- | ApplicationCommandChannelTypeGuildPublicThread
- | ApplicationCommandChannelTypeGuildPrivateThread
- | ApplicationCommandChannelTypeGuildStageVoice
- data GuildApplicationCommandPermissions = GuildApplicationCommandPermissions {}
- data ApplicationCommandPermissions = ApplicationCommandPermissions {}
- data ApplicationCommandPermissionType
- data StringNumberValue
Documentation
data ApplicationCommand Source #
Instances
data ApplicationCommandOptionSubcommandOrGroup Source #
ApplicationCommandOptionSubcommandGroup | |
ApplicationCommandOptionSubcommandOrGroupSubcommand ApplicationCommandOptionSubcommand |
Instances
data ApplicationCommandOptionValue Source #
Instances
data InternalApplicationCommand Source #
The full information about an application command, obtainable with the various get requests. In theory, you never need to construct one of these - so if you are, reconsider what you're doing.
InternalApplicationCommand | |
|
Instances
data CreateApplicationCommand Source #
Data type to be used when creating application commands. The specification is below.
If a command of the same type and and name is sent to the server, it will overwrite any command that already exists in the same scope (guild vs global).
The description has to be empty for non-slash command application
commands, as do the options. The options need to be Nothing
for non-slash
commands, too. If one of the options is a subcommand or subcommand group,
the base command will no longer be usable.
A subcommand group can have subcommands within it. This is the maximum amount of command nesting permitted.
CreateApplicationCommand | |
|
Instances
createApplicationCommandChatInput :: Text -> Text -> Maybe CreateApplicationCommand Source #
Create the basics for a chat input (slash command). Use record overwriting to enter the other values. The name needs to be all lower case letters, and between 1 and 32 characters. The description has to be non-empty and less than or equal to 100 characters.
createApplicationCommandUser :: Text -> Maybe CreateApplicationCommand Source #
Create the basics for a user command. Use record overwriting to enter the other values. The name needs to be between 1 and 32 characters.
createApplicationCommandMessage :: Text -> Maybe CreateApplicationCommand Source #
Create the basics for a message command. Use record overwriting to enter the other values. The name needs to be between 1 and 32 characters.
data EditApplicationCommand Source #
Data type to be used when editing application commands. The specification
is below. See CreateApplicationCommand
for an explanation for the
parameters.
Instances
data ApplicationCommandType Source #
What type of application command. Represents slash commands, right clicking a user, and right clicking a message respectively.
ApplicationCommandTypeChatInput | Slash commands |
ApplicationCommandTypeUser | User commands |
ApplicationCommandTypeMessage | Message commands |
Instances
data InternalApplicationCommandOption Source #
This is the structure that designates different options for slash commands.
InternalApplicationCommandOption | |
|
Instances
data ApplicationCommandOptionType Source #
What type of command option. Can represent a wide variety of types, so please check out the documentation below.
ApplicationCommandOptionTypeSubcommand | A subcommand. It can take further options, excluding sub commands and sub command groups. |
ApplicationCommandOptionTypeSubcommandGroup | A subcommand group. It can take further options, excluding sub command groups. |
ApplicationCommandOptionTypeString | Can typically be provided with default values. |
ApplicationCommandOptionTypeInteger | Can typically be provided with default values, and possibly with minimum and maximum values. |
ApplicationCommandOptionTypeBoolean | |
ApplicationCommandOptionTypeUser | |
ApplicationCommandOptionTypeChannel | Can be limited in the types of the channel allowed. |
ApplicationCommandOptionTypeRole | |
ApplicationCommandOptionTypeMentionable | Users and roles. |
ApplicationCommandOptionTypeNumber | Can typically be provided with default values, and possibly with minimum and maximum values. Represents a double. |
Instances
Choice | |
|
Instances
Functor Choice Source # | |
Eq a => Eq (Choice a) Source # | |
Read a => Read (Choice a) Source # | |
Show a => Show (Choice a) Source # | |
ToJSON a => ToJSON (Choice a) Source # | The choices for a particular option. data InternalApplicationCommandOptionChoice = InternalApplicationCommandOptionChoice { internalApplicationCommandOptionChoiceName :: T.Text, internalApplicationCommandOptionChoiceValue :: StringNumberValue } deriving (Show, Read, Eq) |
Defined in Discord.Internal.Types.ApplicationCommands | |
FromJSON a => FromJSON (Choice a) Source # | |
data ApplicationCommandChannelType Source #
The different channel types.
https://discord.com/developers/docs/resources/channel#channel-object-channel-types
ApplicationCommandChannelTypeGuildText | A text channel in a server. |
ApplicationCommandChannelTypeDM | A direct message between users. |
ApplicationCommandChannelTypeGuildVoice | A voice channel in a server. |
ApplicationCommandChannelTypeGroupDM | A direct message between multiple users. |
ApplicationCommandChannelTypeGuildCategory | An organizational category that contains up to 50 channels. |
ApplicationCommandChannelTypeGuildNews | A channel that users can follow and crosspost into their own server. |
ApplicationCommandChannelTypeGuildStore | A channel in which game developers can sell their game on discord. |
ApplicationCommandChannelTypeGuildNewsThread | A temporary sub-channel within a guild_news channel. |
ApplicationCommandChannelTypeGuildPublicThread | A temporary sub-channel within a guild_text channel |
ApplicationCommandChannelTypeGuildPrivateThread | A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission |
ApplicationCommandChannelTypeGuildStageVoice | A voice channel for hosting events with an audience. |
Instances
data GuildApplicationCommandPermissions Source #
GuildApplicationCommandPermissions | |
|
Instances
data ApplicationCommandPermissions Source #
ApplicationCommandPermissions | |
|
Instances
data ApplicationCommandPermissionType Source #
Instances
data StringNumberValue Source #
Utility data type to store strings or number types.
Instances
Eq StringNumberValue Source # | |
Defined in Discord.Internal.Types.ApplicationCommands (==) :: StringNumberValue -> StringNumberValue -> Bool # (/=) :: StringNumberValue -> StringNumberValue -> Bool # | |
Read StringNumberValue Source # | |
Show StringNumberValue Source # | |
Defined in Discord.Internal.Types.ApplicationCommands showsPrec :: Int -> StringNumberValue -> ShowS # show :: StringNumberValue -> String # showList :: [StringNumberValue] -> ShowS # | |
ToJSON StringNumberValue Source # | |
Defined in Discord.Internal.Types.ApplicationCommands toJSON :: StringNumberValue -> Value # toEncoding :: StringNumberValue -> Encoding # toJSONList :: [StringNumberValue] -> Value # toEncodingList :: [StringNumberValue] -> Encoding # | |
FromJSON StringNumberValue Source # | |
Defined in Discord.Internal.Types.ApplicationCommands parseJSON :: Value -> Parser StringNumberValue # parseJSONList :: Value -> Parser [StringNumberValue] # |