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 #
Instances
Eq Seconds Source # | |
Num Seconds Source # | |
Show Seconds Source # | |
FromJSON Seconds Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser Seconds parseJSONList :: Value -> Parser [Seconds] | |
ToJSON Seconds Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: Seconds -> Encoding toJSONList :: [Seconds] -> Value toEncodingList :: [Seconds] -> Encoding |
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 # | |
FromJSON UserId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser UserId parseJSONList :: Value -> Parser [UserId] | |
ToJSON UserId Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: UserId -> Encoding toJSONList :: [UserId] -> Value toEncodingList :: [UserId] -> Encoding | |
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 # | |
FromJSON ChatId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser ChatId parseJSONList :: Value -> Parser [ChatId] | |
ToJSON ChatId Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: ChatId -> Encoding toJSONList :: [ChatId] -> Value toEncodingList :: [ChatId] -> Encoding | |
Hashable ChatId Source # | |
Defined in Telegram.Bot.API.Types | |
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 # | |
FromJSON ChatType Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser ChatType parseJSONList :: Value -> Parser [ChatType] | |
ToJSON ChatType Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: ChatType -> Encoding toJSONList :: [ChatType] -> Value toEncodingList :: [ChatType] -> Encoding | |
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.1-inplace" '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 # | |
FromJSON MessageId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser MessageId parseJSONList :: Value -> Parser [MessageId] | |
ToJSON MessageId Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: MessageId -> Encoding toJSONList :: [MessageId] -> Value toEncodingList :: [MessageId] -> Encoding | |
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 # | |
FromJSON MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser MediaGroupId parseJSONList :: Value -> Parser [MediaGroupId] | |
ToJSON MediaGroupId Source # | |
Defined in Telegram.Bot.API.Types toJSON :: MediaGroupId -> Value toEncoding :: MediaGroupId -> Encoding toJSONList :: [MediaGroupId] -> Value toEncodingList :: [MediaGroupId] -> Encoding |
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
Unique identifier for this file.
Instances
Eq FileId Source # | |
Show FileId Source # | |
FromJSON FileId Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser FileId parseJSONList :: Value -> Parser [FileId] | |
ToJSON FileId Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: FileId -> Encoding toJSONList :: [FileId] -> Value toEncodingList :: [FileId] -> Encoding |
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
Video
This object represents a video file.
Video | |
|
Instances
Voice
This object represents a voice note.
Voice | |
|
Instances
Show Voice Source # | |
Generic Voice Source # | |
FromJSON Voice Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser Voice parseJSONList :: Value -> Parser [Voice] | |
ToJSON Voice Source # | |
Defined in Telegram.Bot.API.Types | |
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.1-inplace" '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
Contact
This object represents a phone contact.
Contact | |
|
Instances
Location
This object represents a point on the map.
Location | |
|
Instances
Show Location Source # | |
Generic Location Source # | |
FromJSON Location Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser Location parseJSONList :: Value -> Parser [Location] | |
ToJSON Location Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: Location -> Encoding toJSONList :: [Location] -> Value toEncodingList :: [Location] -> Encoding | |
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.1-inplace" '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 # | |
FromJSON Venue Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser Venue parseJSONList :: Value -> Parser [Venue] | |
ToJSON Venue Source # | |
Defined in Telegram.Bot.API.Types | |
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.1-inplace" '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 # | |
FromJSON File Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser File parseJSONList :: Value -> Parser [File] | |
ToJSON File Source # | |
Defined in Telegram.Bot.API.Types | |
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.1-inplace" '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 # | |
FromJSON ChatPhoto Source # | |
Defined in Telegram.Bot.API.Types parseJSON :: Value -> Parser ChatPhoto parseJSONList :: Value -> Parser [ChatPhoto] | |
ToJSON ChatPhoto Source # | |
Defined in Telegram.Bot.API.Types toEncoding :: ChatPhoto -> Encoding toJSONList :: [ChatPhoto] -> Value toEncodingList :: [ChatPhoto] -> Encoding | |
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.1-inplace" '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 | |
|