discord-haskell-1.12.5: Write bots for Discord in Haskell
Safe HaskellNone
LanguageHaskell2010

Discord.Internal.Types.ApplicationCommands

Synopsis

Documentation

data ApplicationCommand Source #

The structure for an application command.

Constructors

ApplicationCommandUser 

Fields

ApplicationCommandMessage 

Fields

ApplicationCommandChatInput 

Fields

data ApplicationCommandOptions Source #

Either subcommands and groups, or values.

data ApplicationCommandOptionSubcommandOrGroup Source #

Either a subcommand group or a subcommand.

Instances

Instances details
Eq ApplicationCommandOptionSubcommandOrGroup Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Read ApplicationCommandOptionSubcommandOrGroup Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show ApplicationCommandOptionSubcommandOrGroup Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON ApplicationCommandOptionSubcommandOrGroup Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON ApplicationCommandOptionSubcommandOrGroup Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

data ApplicationCommandOptionSubcommand Source #

Data for a single subcommand.

Constructors

ApplicationCommandOptionSubcommand 

Fields

Instances

Instances details
Eq ApplicationCommandOptionSubcommand Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Read ApplicationCommandOptionSubcommand Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show ApplicationCommandOptionSubcommand Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON ApplicationCommandOptionSubcommand Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON ApplicationCommandOptionSubcommand Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

data ApplicationCommandOptionValue Source #

Data for a single value.

Constructors

ApplicationCommandOptionValueString 

Fields

ApplicationCommandOptionValueInteger 

Fields

ApplicationCommandOptionValueBoolean 

Fields

ApplicationCommandOptionValueUser 

Fields

ApplicationCommandOptionValueChannel 

Fields

ApplicationCommandOptionValueRole 

Fields

ApplicationCommandOptionValueMentionable 

Fields

ApplicationCommandOptionValueNumber 

Fields

Instances

Instances details
Eq ApplicationCommandOptionValue Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Read ApplicationCommandOptionValue Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show ApplicationCommandOptionValue Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON ApplicationCommandOptionValue Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON ApplicationCommandOptionValue Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

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 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.

https://discord.com/developers/docs/interactions/application-commands#create-global-application-command

Constructors

CreateApplicationCommandChatInput 

Fields

CreateApplicationCommandUser 

Fields

CreateApplicationCommandMessage 

Fields

data Choice a Source #

Constructors

Choice 

Fields

Instances

Instances details
Functor Choice Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Methods

fmap :: (a -> b) -> Choice a -> Choice b #

(<$) :: a -> Choice b -> Choice a #

Eq a => Eq (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Methods

(==) :: Choice a -> Choice a -> Bool #

(/=) :: Choice a -> Choice a -> Bool #

Ord a => Ord (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Methods

compare :: Choice a -> Choice a -> Ordering #

(<) :: Choice a -> Choice a -> Bool #

(<=) :: Choice a -> Choice a -> Bool #

(>) :: Choice a -> Choice a -> Bool #

(>=) :: Choice a -> Choice a -> Bool #

max :: Choice a -> Choice a -> Choice a #

min :: Choice a -> Choice a -> Choice a #

Read a => Read (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show a => Show (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Methods

showsPrec :: Int -> Choice a -> ShowS #

show :: Choice a -> String #

showList :: [Choice a] -> ShowS #

ToJSON a => ToJSON (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON a => FromJSON (Choice a) Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

data ApplicationCommandChannelType Source #

Constructors

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

Instances details
Eq ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Data ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ApplicationCommandChannelType -> c ApplicationCommandChannelType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ApplicationCommandChannelType #

toConstr :: ApplicationCommandChannelType -> Constr #

dataTypeOf :: ApplicationCommandChannelType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ApplicationCommandChannelType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ApplicationCommandChannelType) #

gmapT :: (forall b. Data b => b -> b) -> ApplicationCommandChannelType -> ApplicationCommandChannelType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ApplicationCommandChannelType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ApplicationCommandChannelType -> r #

gmapQ :: (forall d. Data d => d -> u) -> ApplicationCommandChannelType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ApplicationCommandChannelType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ApplicationCommandChannelType -> m ApplicationCommandChannelType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicationCommandChannelType -> m ApplicationCommandChannelType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicationCommandChannelType -> m ApplicationCommandChannelType #

Read ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

InternalDiscordEnum ApplicationCommandChannelType Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

data GuildApplicationCommandPermissions Source #

Instances

Instances details
Eq GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Ord GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Read GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON GuildApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

data ApplicationCommandPermissions Source #

Application command permissions allow you to enable or disable commands for specific users or roles within a guild.

Constructors

ApplicationCommandPermissions 

Fields

Instances

Instances details
Eq ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Ord ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Read ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

Show ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

ToJSON ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands

FromJSON ApplicationCommandPermissions Source # 
Instance details

Defined in Discord.Internal.Types.ApplicationCommands