| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Discord.Internal.Types.Components
Description
Message components
Synopsis
- data ActionRow
- data Button
- = Button { }
- | ButtonUrl {
- buttonUrl :: Text
- buttonDisabled :: Bool
- buttonLabel :: Maybe Text
- buttonEmoji :: Maybe Emoji
- data ButtonStyle
- mkButton :: Text -> Text -> Button
- data SelectMenu = SelectMenu {}
- mkSelectMenu :: Text -> [SelectOption] -> SelectMenu
- data SelectMenuData
- data SelectOption = SelectOption {}
- mkSelectOption :: Text -> Text -> SelectOption
- data TextInput = TextInput {}
- mkTextInput :: Text -> Text -> TextInput
Documentation
Container for other message Components
Constructors
| ActionRowButtons [Button] | |
| ActionRowSelectMenu SelectMenu |
Instances
Component type for a button, split into URL button and not URL button.
Don't directly send button components - they need to be within an action row.
Constructors
| Button | |
Fields
| |
| ButtonUrl | |
Fields
| |
data ButtonStyle Source #
Buttton colors.
Constructors
| ButtonStylePrimary | Blurple button |
| ButtonStyleSecondary | Grey button |
| ButtonStyleSuccess | Green button |
| ButtonStyleDanger | Red button |
Instances
mkButton :: Text -> Text -> Button Source #
Takes the label and the custom id of the button that is to be generated.
data SelectMenu Source #
Component type for a select menu.
Don't directly send select menus - they need to be within an action row.
Constructors
| SelectMenu | |
Fields
| |
Instances
mkSelectMenu :: Text -> [SelectOption] -> SelectMenu Source #
Takes the custom id and the options of the select menu that is to be generated.
data SelectMenuData Source #
Constructors
| SelectMenuDataText [SelectOption] | Text options |
| SelectMenuDataUser | Users |
| SelectMenuDataRole | Roles |
| SelectMenuDataMentionable | Anything mentionable (users and roles) |
| SelectMenuDataChannels [ChannelTypeOption] | Channels (of certain types) |
Instances
data SelectOption Source #
A single option in a select menu.
Constructors
| SelectOption | |
Fields
| |
Instances
mkSelectOption :: Text -> Text -> SelectOption Source #
Make a select option from the given label and value.
Constructors
| TextInput | |
Fields
| |