Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type RequiredQueryParam = QueryParam' '[Required, Strict]
- newtype Seconds = Seconds Int32
- data User = User {}
- newtype UserId = UserId Int32
- data Chat = Chat {
- chatId :: ChatId
- chatType :: ChatType
- chatTitle :: Maybe Text
- chatUsername :: Maybe Text
- chatFirstName :: Maybe Text
- chatLastName :: Maybe Text
- chatAllMembersAreAdministrators :: Maybe Bool
- chatPhoto :: Maybe ChatPhoto
- chatDescription :: Maybe Text
- chatInviteLink :: Maybe Text
- chatPinnedMessage :: Maybe Message
- chatStickerSetName :: Maybe Text
- chatCanSetStickerSet :: Maybe Bool
- newtype ChatId = ChatId Integer
- data ChatType
- data Message = Message {
- messageMessageId :: MessageId
- messageFrom :: Maybe User
- messageDate :: POSIXTime
- messageChat :: Chat
- messageForwardFrom :: Maybe User
- messageForwardFromChat :: Maybe Chat
- messageForwardFromMessageId :: Maybe MessageId
- messageForwardSignature :: Maybe Text
- messageForwardDate :: Maybe POSIXTime
- messageReplyToMessage :: Maybe Message
- messageEditDate :: Maybe POSIXTime
- messageMediaGroupId :: Maybe MediaGroupId
- messageAuthorSignature :: Maybe Text
- messageText :: Maybe Text
- messageEntities :: Maybe [MessageEntity]
- messageCaptionEntities :: Maybe [MessageEntity]
- messageAudio :: Maybe Audio
- messageDocument :: Maybe Document
- messagePhoto :: Maybe [PhotoSize]
- messageVideo :: Maybe Video
- messageVoice :: Maybe Voice
- messageVideoNote :: Maybe VideoNote
- messageCaption :: Maybe Text
- messageContact :: Maybe Contact
- messageLocation :: Maybe Location
- messageVenue :: Maybe Venue
- messageNewChatMembers :: Maybe [User]
- messageLeftChatMember :: Maybe User
- messageNewChatTitle :: Maybe Text
- messageNewChatPhoto :: Maybe [PhotoSize]
- messageDeleteChatPhoto :: Maybe Bool
- messageGroupChatCreated :: Maybe Bool
- messageSupergroupChatCreated :: Maybe Bool
- messageChannelChatCreated :: Maybe Bool
- messageMigrateToChatId :: Maybe ChatId
- messageMigrateFromChatId :: Maybe ChatId
- messagePinnedMessage :: Maybe Message
- newtype MessageId = MessageId Int32
- newtype MediaGroupId = MediaGroupId Text
- data MessageEntity = MessageEntity {}
- data MessageEntityType
- = MessageEntityMention
- | MessageEntityHashtag
- | MessageEntityBotCommand
- | MessageEntityUrl
- | MessageEntityEmail
- | MessageEntityBold
- | MessageEntityItalic
- | MessageEntityUnderline
- | MessageEntityStrikethrough
- | MessageEntityCode
- | MessageEntityPre
- | MessageEntityTextLink
- | MessageEntityTextMention
- | MessageEntityCashtag
- | MessageEntityPhoneNumber
- data PhotoSize = PhotoSize {}
- newtype FileId = FileId Text
- data Audio = Audio {}
- data Document = Document {}
- data Video = Video {}
- data Voice = Voice {}
- data VideoNote = VideoNote {}
- data Contact = Contact {}
- data Location = Location {}
- data Venue = Venue {}
- data UserProfilePhotos = UserProfilePhotos {}
- data File = File {}
- data ReplyKeyboardMarkup = ReplyKeyboardMarkup {}
- data KeyboardButton = KeyboardButton {}
- data ReplyKeyboardRemove = ReplyKeyboardRemove {}
- data InlineKeyboardMarkup = InlineKeyboardMarkup {}
- data InlineKeyboardButton = InlineKeyboardButton {}
- labeledInlineKeyboardButton :: Text -> InlineKeyboardButton
- data CallbackQuery = CallbackQuery {}
- newtype CallbackQueryId = CallbackQueryId Text
- data ForceReply = ForceReply {}
- data ChatPhoto = ChatPhoto {}
- data ChatMember = ChatMember {
- chatMemberUser :: User
- chatMemberStatus :: Text
- chatMemberUntilDate :: Maybe POSIXTime
- chatMemberCanBeEdited :: Maybe Bool
- chatMemberCanChangeInfo :: Maybe Bool
- chatMemberCanPostMessages :: Maybe Bool
- chatMemberCanEditMessages :: Maybe Bool
- chatMemberCanDeleteMessages :: Maybe Bool
- chatMemberCanInviteUsers :: Maybe Bool
- chatMemberCanRestrictMembers :: Maybe Bool
- chatMemberCanPinMessages :: Maybe Bool
- chatMemberCanPromoteMembers :: Maybe Bool
- chatMemberCanSendMessages :: Maybe Bool
- chatMemberCanSendMediaMessages :: Maybe Bool
- chatMemberCanSendOtherMessages :: Maybe Bool
- chatMemberCanAddWebPagePreviews :: Maybe Bool
- data ResponseParameters = ResponseParameters {}
Documentation
type RequiredQueryParam = QueryParam' '[Required, Strict] Source #
Available types
User
This object represents a Telegram user or bot.
User | |
|
Instances
Unique identifier for this user or bot.
Instances
Eq UserId Source # | |
Show UserId Source # | |
ToJSON UserId Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON UserId Source # | |
ToHttpApiData UserId Source # | |
Defined in Telegram.Bot.API.Types toUrlPiece :: UserId -> Text # toEncodedUrlPiece :: UserId -> Builder # toHeader :: UserId -> ByteString # toQueryParam :: UserId -> Text # |
Chat
This object represents a chat.
Chat | |
|
Instances
Unique identifier for this chat.
Instances
Eq ChatId Source # | |
Show ChatId Source # | |
Hashable ChatId Source # | |
Defined in Telegram.Bot.API.Types | |
ToJSON ChatId Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON ChatId Source # | |
ToHttpApiData ChatId Source # | |
Defined in Telegram.Bot.API.Types toUrlPiece :: ChatId -> Text # toEncodedUrlPiece :: ChatId -> Builder # toHeader :: ChatId -> ByteString # toQueryParam :: ChatId -> Text # |
Type of chat.
Instances
Show ChatType Source # | |
Generic ChatType Source # | |
ToJSON ChatType Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON ChatType Source # | |
type Rep ChatType Source # | |
Defined in Telegram.Bot.API.Types type Rep ChatType = D1 ('MetaData "ChatType" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) ((C1 ('MetaCons "ChatTypePrivate" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChatTypeGroup" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChatTypeSupergroup" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChatTypeChannel" 'PrefixI 'False) (U1 :: Type -> Type))) |
Message
This object represents a message.
Message | |
|
Instances
Unique message identifier inside this chat.
Instances
Eq MessageId Source # | |
Show MessageId Source # | |
Hashable MessageId Source # | |
Defined in Telegram.Bot.API.Types | |
ToJSON MessageId Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON MessageId Source # | |
ToHttpApiData MessageId Source # | |
Defined in Telegram.Bot.API.Types toUrlPiece :: MessageId -> Text # toEncodedUrlPiece :: MessageId -> Builder # toHeader :: MessageId -> ByteString # toQueryParam :: MessageId -> Text # |
newtype MediaGroupId Source #
The unique identifier of a media message group a message belongs to.
Instances
Eq MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types (==) :: MediaGroupId -> MediaGroupId -> Bool # (/=) :: MediaGroupId -> MediaGroupId -> Bool # | |
Show MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types showsPrec :: Int -> MediaGroupId -> ShowS # show :: MediaGroupId -> String # showList :: [MediaGroupId] -> ShowS # | |
ToJSON MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types toJSON :: MediaGroupId -> Value # toEncoding :: MediaGroupId -> Encoding # toJSONList :: [MediaGroupId] -> Value # toEncodingList :: [MediaGroupId] -> Encoding # | |
FromJSON MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser MediaGroupId # parseJSONList :: Value -> Parser [MediaGroupId] # |
MessageEntity
data MessageEntity Source #
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
MessageEntity | |
|
Instances
data MessageEntityType Source #
Type of the entity. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), underline (underlined text), strikethrough, code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames), cashtag, phone_number
Instances
PhotoSize
This object represents one size of a photo or a file / sticker thumbnail.
PhotoSize | |
|
Instances
Show PhotoSize Source # | |
Generic PhotoSize Source # | |
ToJSON PhotoSize Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON PhotoSize Source # | |
type Rep PhotoSize Source # | |
Defined in Telegram.Bot.API.Types type Rep PhotoSize = D1 ('MetaData "PhotoSize" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "PhotoSize" 'PrefixI 'True) ((S1 ('MetaSel ('Just "photoSizeFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId) :*: S1 ('MetaSel ('Just "photoSizeWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32)) :*: (S1 ('MetaSel ('Just "photoSizeHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "photoSizeFileSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int32))))) |
Unique identifier for this file.
Audio
This object represents an audio file to be treated as music by the Telegram clients.
Audio | |
|
Instances
Document
This object represents a general file (as opposed to photos, voice messages and audio files).
Document | |
|
Instances
Show Document Source # | |
Generic Document Source # | |
ToJSON Document Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON Document Source # | |
type Rep Document Source # | |
Defined in Telegram.Bot.API.Types type Rep Document = D1 ('MetaData "Document" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "Document" 'PrefixI 'True) ((S1 ('MetaSel ('Just "documentFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId) :*: S1 ('MetaSel ('Just "documentThumb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PhotoSize))) :*: (S1 ('MetaSel ('Just "documentFileName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "documentMimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "documentFileSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int32)))))) |
Video
This object represents a video file.
Video | |
|
Instances
Voice
This object represents a voice note.
Voice | |
|
Instances
Show Voice Source # | |
Generic Voice Source # | |
ToJSON Voice Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON Voice Source # | |
type Rep Voice Source # | |
Defined in Telegram.Bot.API.Types type Rep Voice = D1 ('MetaData "Voice" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "Voice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "voiceFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId) :*: S1 ('MetaSel ('Just "voiceDuration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Seconds)) :*: (S1 ('MetaSel ('Just "voiceMimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "voiceFileSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int32))))) |
VideoNote
This object represents a video message (available in Telegram apps as of v.4.0).
VideoNote | |
|
Instances
Show VideoNote Source # | |
Generic VideoNote Source # | |
ToJSON VideoNote Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON VideoNote Source # | |
type Rep VideoNote Source # | |
Defined in Telegram.Bot.API.Types type Rep VideoNote = D1 ('MetaData "VideoNote" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "VideoNote" 'PrefixI 'True) ((S1 ('MetaSel ('Just "videoNoteFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "videoNoteLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32)) :*: (S1 ('MetaSel ('Just "videoNoteDuration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Seconds) :*: (S1 ('MetaSel ('Just "videoNoteThumb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PhotoSize)) :*: S1 ('MetaSel ('Just "videoNoteFileSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int32)))))) |
Contact
This object represents a phone contact.
Contact | |
|
Instances
Show Contact Source # | |
Generic Contact Source # | |
ToJSON Contact Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON Contact Source # | |
type Rep Contact Source # | |
Defined in Telegram.Bot.API.Types type Rep Contact = D1 ('MetaData "Contact" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "Contact" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contactPhoneNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "contactFirstName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "contactLastName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "contactUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UserId))))) |
Location
This object represents a point on the map.
Location | |
|
Instances
Show Location Source # | |
Generic Location Source # | |
ToJSON Location Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON Location Source # | |
type Rep Location Source # | |
Defined in Telegram.Bot.API.Types type Rep Location = D1 ('MetaData "Location" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) (S1 ('MetaSel ('Just "locationLongitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Float) :*: S1 ('MetaSel ('Just "locationLatitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Float))) |
Venue
This object represents a venue.
Venue | |
|
Instances
Show Venue Source # | |
Generic Venue Source # | |
ToJSON Venue Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON Venue Source # | |
type Rep Venue Source # | |
Defined in Telegram.Bot.API.Types type Rep Venue = D1 ('MetaData "Venue" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "Venue" 'PrefixI 'True) ((S1 ('MetaSel ('Just "venueLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Location) :*: S1 ('MetaSel ('Just "venueTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "venueAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "venueFoursquareId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))) |
UserProfilePhotos
data UserProfilePhotos Source #
This object represent a user's profile pictures.
UserProfilePhotos | |
|
Instances
File
This object represents a file ready to be downloaded.
The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>
.
It is guaranteed that the link will be valid for at least 1 hour.
When the link expires, a new one can be requested by calling getFile.
File | |
|
Instances
Show File Source # | |
Generic File Source # | |
ToJSON File Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON File Source # | |
type Rep File Source # | |
Defined in Telegram.Bot.API.Types type Rep File = D1 ('MetaData "File" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "File" 'PrefixI 'True) (S1 ('MetaSel ('Just "fileFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId) :*: (S1 ('MetaSel ('Just "fileFileSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int32)) :*: S1 ('MetaSel ('Just "fileFilePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))) |
ReplyKeyboardMarkup
data ReplyKeyboardMarkup Source #
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
ReplyKeyboardMarkup | |
|
Instances
KeyboardButton
data KeyboardButton Source #
This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields are mutually exclusive.
KeyboardButton | |
|
Instances
ReplyKeyboardRemove
data ReplyKeyboardRemove Source #
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
By default, custom keyboards are displayed until a new keyboard is sent by a bot.
An exception is made for one-time keyboards that are hidden immediately after
the user presses a button (see ReplyKeyboardMarkup
).
ReplyKeyboardRemove | |
|
Instances
InlineKeyboardMarkup
data InlineKeyboardMarkup Source #
This object represents an inline keyboard that appears right next to the message it belongs to.
InlineKeyboardMarkup | |
|
Instances
InlineKeyboardButton
data InlineKeyboardButton Source #
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
InlineKeyboardButton | |
|
Instances
CallbackQuery
data CallbackQuery Source #
This object represents an incoming callback query from a callback button
in an inline keyboard. If the button that originated the query was attached
to a message sent by the bot, the field message will be present.
If the button was attached to a message sent via the bot (in inline mode),
the field inline_message_id
will be present.
Exactly one of the fields data or game_short_name will be present.
CallbackQuery | |
|
Instances
newtype CallbackQueryId Source #
Instances
ForceReply
data ForceReply Source #
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
ForceReply | |
|
Instances
Chat photo
Chat photo. Returned only in getChat.
ChatPhoto | |
|
Instances
Show ChatPhoto Source # | |
Generic ChatPhoto Source # | |
ToJSON ChatPhoto Source # | |
Defined in Telegram.Bot.API.Types | |
FromJSON ChatPhoto Source # | |
type Rep ChatPhoto Source # | |
Defined in Telegram.Bot.API.Types type Rep ChatPhoto = D1 ('MetaData "ChatPhoto" "Telegram.Bot.API.Types" "telegram-bot-simple-0.3.6-CnYJ2aTf6jS1Fsl7jGyEDK" 'False) (C1 ('MetaCons "ChatPhoto" 'PrefixI 'True) (S1 ('MetaSel ('Just "chatPhotoSmallFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId) :*: S1 ('MetaSel ('Just "chatPhotoBigFileId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileId))) |
ChatMember
data ChatMember Source #
This object contains information about one member of a chat.
ChatMember | |
|
Instances
ResponseParameters
data ResponseParameters Source #
Contains information about why a request was unsuccessful.
ResponseParameters | |
|