Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 SelectOption = SelectOption {}
- mkSelectOption :: Text -> Text -> SelectOption
- data TextInput = TextInput {}
- mkTextInput :: Text -> Text -> TextInput
Documentation
Container for other message Components
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.
Button | |
| |
ButtonUrl | |
|
data ButtonStyle Source #
Buttton colors.
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.
SelectMenu | |
|
Instances
mkSelectMenu :: Text -> [SelectOption] -> SelectMenu Source #
Takes the custom id and the options of the select menu that is to be generated.
data SelectOption Source #
A single option in a select menu.
SelectOption | |
|
Instances
mkSelectOption :: Text -> Text -> SelectOption Source #
Make a select option from the given label and value.
TextInput | |
|