packages feed

telegram-bot-api 6.7.1 → 7.0

raw patch · 68 files changed

+1202/−72 lines, 68 files

Files

CHANGELOG.md view
@@ -1,5 +1,64 @@ # telegram-bot-api +## 7.0 -- 2024-02-06++- Support GHC 9.6 (see [#163](https://github.com/fizruk/telegram-bot-simple/pull/163)).++### Bot API 6.8 support++See [#165](https://github.com/fizruk/telegram-bot-simple/pull/165).++- Add new methods:+  - `unpinAllGeneralForumTopicMessages`.+- Add new types:+  - `Story`.+- Modify existing types:+  - `Message`, `Chat`, `PollAnswer`.++### Bot API 6.9 support++See [#168](https://github.com/fizruk/telegram-bot-simple/pull/168).++- Modify methods:+  - `promoteChatMember`.+- Modify types:+  - `ChatMember`.+  - `ChatAdministratorRights`+  - `WriteAccessAllowed`.++### Bot API 7.0 support++See [#169](https://github.com/fizruk/telegram-bot-simple/pull/169).++- Reactions:+  - New types: `ReactionType`, `ReactionCount`, `MessageReactionUpdated`, `MessageReactionCountUpdated`.+  - Modified types: `Chat`.+  - New method: `setMessageReaction`.+- Replies 2.0:+  - New types: `ExternalReplyInfo`, `MessageOrigin`, `TextQuote`, `ReplyParameters`.+  - Modified types: `Message`.+  - Modified methods: `copyMessage`, `sendAnimation`, `sendAudio`, `sendContact`, `sendDice`, `sendDocument`, `sendGame`, `sendInvoice`, `sendLocation`, `sendMediaGroup`, `sendMessage`, `sendPhoto`, `sendPoll`, `sendSticler`, `sendVenue`, `sendVideo`, `sendVideoNote`, `sendVoice`.+- Link Preview Customization:+  - New type: `LinkPreviewOptions`.+  - Modified types: `Message`.+  - Modified methods: `editMessage`, `sendMessage`.+- Multiple Message Actions:+  - New methods: `copyMessages`, `deleteMessages` and `forwardMessages`.+- Request for multiple users:+  - Deteled type: `KeyboardButtonRequestUser`+  - New types: `KeyboardButtonRequestUsers`, `UsersShared`.+  - Modified types: `KeyboardButton`, `Message`.+- Chat Boost:+  - New types: `ChatBoost`, `ChatBoostRemoved`, `ChatBoostSource`, `ChatBoostUpdated`, `UserChatBoosts`.+  - New methods: `getUserChatBoosts`.+- Giveaway:+  - New types: `Giveaway`, `GiveawayCompleted`, `GiveawayCreated`, `GiveawayWinners`.+  - Modified type: `Message`.+- Other changes:+  - `Message` could become inaccessible, see `isInaccessibleMessage` helper.+  - `CallbackQuery` documentation improved.+  - `Chat` type has been updated with extra fields, also enabled preliminary support of `WebApp`.+ ## 6.7.1 -- 2023-06-26  - Fix Inline Mode (see [#157](https://github.com/fizruk/telegram-bot-simple/pull/157)).
src/Telegram/Bot/API/Forum.hs view
@@ -152,6 +152,21 @@ unpinAllForumTopicMessages :: UnpinAllForumTopicMessagesRequest -> ClientM (Response Bool) unpinAllForumTopicMessages = client (Proxy @UnpinAllForumTopicMessages) +-- ** 'unpinAllGeneralForumTopicMessages'++type UnpinAllGeneralForumTopicMessages = "unpinAllGeneralForumTopicMessages"+  :> RequiredQueryParam "chat_id" SomeChatId -- ^ Unique identifier for the target chat or username of the target @supergroup@ (in the format \@supergroupusername)+  :> Post '[JSON] (Response Bool)++-- | Use this method to clear the list of pinned messages+--   in a @General@ forum topic. The bot must be an administrator+--   in the chat for this to work and must have the 'can_pin_messages' administrator right+--   in the supergroup. Returns 'True' on success.+unpinAllGeneralForumTopicMessages :: SomeChatId -- ^ Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)+  -> ClientM (Response Bool)+unpinAllGeneralForumTopicMessages = client (Proxy @UnpinAllGeneralForumTopicMessages)++ -- ** 'editGeneralForumTopic'  data EditGeneralForumTopicRequest = EditGeneralForumTopicRequest
src/Telegram/Bot/API/Games.hs view
@@ -15,8 +15,12 @@  import Telegram.Bot.API.Internal.Utils (deriveJSON') import Telegram.Bot.API.MakingRequests (Response)-import Telegram.Bot.API.Types (ChatId, GameHighScore, InlineKeyboardMarkup, Message, MessageId, MessageThreadId, UserId)+import Telegram.Bot.API.Types+  ( ChatId, GameHighScore, InlineKeyboardMarkup, Message, MessageId, MessageThreadId+  , ReplyParameters, UserId+  ) import Telegram.Bot.API.Internal.TH+ -- * Types  -- ** 'SendGameRequest'@@ -28,7 +32,7 @@   , sendGameDisableNotification      :: Maybe Bool                 -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendGameProtectContent           :: Maybe Bool                 -- ^ Protects the contents of the sent message from forwarding and saving.   , sendGameReplyToMessageId         :: Maybe MessageId            -- ^ If the message is a reply, ID of the original message.-  , sendGameAllowSendingWithoutReply :: Maybe Bool                 -- ^ Pass 'True', if the message should be sent even if the specified replied-to message is not found+  , sendGameReplyParameters          :: Maybe ReplyParameters      -- ^ Description of the message to reply to.   , sendGameReplyMarkup              :: Maybe InlineKeyboardMarkup -- ^ A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.   }   deriving (Generic, Show)
src/Telegram/Bot/API/GettingUpdates.hs view
@@ -32,6 +32,8 @@   , updateMessage           :: Maybe Message -- ^ New incoming message of any kind — text, photo, sticker, etc.   , updateEditedMessage     :: Maybe Message -- ^ New version of a message that is known to the bot and was edited   , updateChannelPost       :: Maybe Message -- ^ New incoming channel post of any kind — text, photo, sticker, etc.+  , updateMessageReaction   :: Maybe MessageReactionUpdated -- ^ A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.+  , updateMessageReactionCount :: Maybe MessageReactionCountUpdated -- ^ Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.   , updateEditedChannelPost :: Maybe Message -- ^ New version of a channel post that is known to the bot and was edited    , updateInlineQuery       :: Maybe InlineQuery -- ^ New incoming inline query@@ -47,6 +49,8 @@   , updateMyChatMember      :: Maybe ChatMemberUpdated -- ^ The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.   , updateChatMember        :: Maybe ChatMemberUpdated -- ^ A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.   , updateChatJoinRequest   :: Maybe ChatJoinRequest -- ^ A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.+  , updateChatBoost         :: Maybe ChatBoostUpdated -- ^ A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.+  , updateRemovedChatBoost  :: Maybe ChatBoostRemoved -- ^ A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.   } deriving (Generic, Show)  instance ToJSON   Update where toJSON = gtoJSON
src/Telegram/Bot/API/Methods.hs view
@@ -18,17 +18,20 @@   , module Telegram.Bot.API.Methods.BanChatMember   , module Telegram.Bot.API.Methods.BanChatSenderChat   , module Telegram.Bot.API.Methods.CopyMessage+  , module Telegram.Bot.API.Methods.CopyMessages   , module Telegram.Bot.API.Methods.CreateChatInviteLink   , module Telegram.Bot.API.Methods.DeclineChatJoinRequest   , module Telegram.Bot.API.Methods.DeleteChatPhoto   , module Telegram.Bot.API.Methods.DeleteChatStickerSet   , module Telegram.Bot.API.Methods.DeleteMessage+  , module Telegram.Bot.API.Methods.DeleteMessages   , module Telegram.Bot.API.Methods.DeleteMyCommands   , module Telegram.Bot.API.Methods.DeleteStickerSet   , module Telegram.Bot.API.Methods.EditChatInviteLink   , module Telegram.Bot.API.Methods.EditMessageLiveLocation   , module Telegram.Bot.API.Methods.ExportChatInviteLink   , module Telegram.Bot.API.Methods.ForwardMessage+  , module Telegram.Bot.API.Methods.ForwardMessages   , module Telegram.Bot.API.Methods.GetChat   , module Telegram.Bot.API.Methods.GetChatAdministrators   , module Telegram.Bot.API.Methods.GetChatMember@@ -40,6 +43,7 @@   , module Telegram.Bot.API.Methods.GetMyDefaultAdministratorRights   , module Telegram.Bot.API.Methods.GetMyDescription   , module Telegram.Bot.API.Methods.GetMyShortDescription+  , module Telegram.Bot.API.Methods.GetUserChatBoosts   , module Telegram.Bot.API.Methods.GetUserProfilePhotos   , module Telegram.Bot.API.Methods.LeaveChat   , module Telegram.Bot.API.Methods.PinChatMessage@@ -68,6 +72,7 @@   , module Telegram.Bot.API.Methods.SetChatPhoto   , module Telegram.Bot.API.Methods.SetChatStickerSet   , module Telegram.Bot.API.Methods.SetChatTitle+  , module Telegram.Bot.API.Methods.SetMessageReaction   , module Telegram.Bot.API.Methods.SetMyCommands   , module Telegram.Bot.API.Methods.SetCustomEmojiStickerSetThumbnail   , module Telegram.Bot.API.Methods.SetMyDefaultAdministratorRights@@ -97,17 +102,20 @@ import Telegram.Bot.API.Methods.BanChatMember import Telegram.Bot.API.Methods.BanChatSenderChat import Telegram.Bot.API.Methods.CopyMessage+import Telegram.Bot.API.Methods.CopyMessages import Telegram.Bot.API.Methods.CreateChatInviteLink import Telegram.Bot.API.Methods.DeclineChatJoinRequest import Telegram.Bot.API.Methods.DeleteChatPhoto import Telegram.Bot.API.Methods.DeleteChatStickerSet import Telegram.Bot.API.Methods.DeleteMessage+import Telegram.Bot.API.Methods.DeleteMessages import Telegram.Bot.API.Methods.DeleteMyCommands import Telegram.Bot.API.Methods.DeleteStickerSet import Telegram.Bot.API.Methods.EditChatInviteLink import Telegram.Bot.API.Methods.EditMessageLiveLocation import Telegram.Bot.API.Methods.ExportChatInviteLink import Telegram.Bot.API.Methods.ForwardMessage+import Telegram.Bot.API.Methods.ForwardMessages import Telegram.Bot.API.Methods.GetChat import Telegram.Bot.API.Methods.GetChatAdministrators import Telegram.Bot.API.Methods.GetChatMember@@ -119,6 +127,7 @@ import Telegram.Bot.API.Methods.GetMyDefaultAdministratorRights import Telegram.Bot.API.Methods.GetMyDescription import Telegram.Bot.API.Methods.GetMyShortDescription+import Telegram.Bot.API.Methods.GetUserChatBoosts import Telegram.Bot.API.Methods.GetUserProfilePhotos import Telegram.Bot.API.Methods.LeaveChat import Telegram.Bot.API.Methods.PinChatMessage@@ -147,6 +156,7 @@ import Telegram.Bot.API.Methods.SetChatPhoto import Telegram.Bot.API.Methods.SetChatStickerSet import Telegram.Bot.API.Methods.SetChatTitle+import Telegram.Bot.API.Methods.SetMessageReaction import Telegram.Bot.API.Methods.SetMyCommands import Telegram.Bot.API.Methods.SetCustomEmojiStickerSetThumbnail import Telegram.Bot.API.Methods.SetMyDefaultAdministratorRights
src/Telegram/Bot/API/Methods/CopyMessage.hs view
@@ -45,7 +45,7 @@   , copyMessageDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , copyMessageProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , copyMessageReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , copyMessageAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , copyMessageReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , copyMessageReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
+ src/Telegram/Bot/API/Methods/CopyMessages.hs view
@@ -0,0 +1,57 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-}+module Telegram.Bot.API.Methods.CopyMessages where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Proxy+import Data.Text+import GHC.Generics (Generic)+import Servant.API+import Servant.Client hiding (Response)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.MakingRequests+import Telegram.Bot.API.Types+import Telegram.Bot.API.Types.ParseMode+import Telegram.Bot.API.Internal.TH++-- ** 'copyMessages'++type CopyMessages+  = "copyMessages"+  :> ReqBody '[JSON] CopyMessagesRequest+  :> Post '[JSON] (Response [CopyMessageId])++-- | Use this method to copy messages of any kind.+-- If some of the specified messages can't be found or copied, they are skipped.+-- Service messages, giveaway messages, giveaway winners messages,+-- and invoice messages can't be copied.+-- A quiz poll can be copied only if the value of the field @correct_option_id@ is knownto the bot.+-- The method is analogous to the method 'forwardMessages',+-- but the copied messages don't have a link to the original message.+-- Album grouping is kept for copied messages.+-- On success, an array of 'CopyMessageId' of the sent messages is returned.+copyMessages :: CopyMessagesRequest ->  ClientM (Response [CopyMessageId])+copyMessages = client (Proxy @CopyMessages)++-- | Request parameters for 'copyMessages'.+data CopyMessagesRequest = CopyMessagesRequest+  { copyMessagesChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format @channelusername).+  , copyMessagesMessageThreadId :: Maybe Message -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.+  , copyMessagesFromChatId :: SomeChatId -- ^ Unique identifier for the chat where the original message was sent (or channel username in the format \@channelusername).+  , copyMessagesMessageIds :: [MessageId] -- ^ Identifiers of 1-100 messages in the chat @from_chat_id@ to copy. The identifiers must be specified in a strictly increasing order.+  , copyMessagesCaption :: Maybe Text -- ^ New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept+  , copyMessagesParseMode :: Maybe ParseMode  -- ^ Send 'MarkdownV2', 'HTML' or 'Markdown' (legacy), if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.+  , copyMessagesCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode+  , copyMessagesDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.+  , copyMessagesProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving+  , copyMessagesRemoveCaption :: Maybe Bool -- ^ Pass 'True' to copy the messages without their captions.+  }+  deriving Generic++instance ToJSON   CopyMessagesRequest where toJSON = gtoJSON+instance FromJSON CopyMessagesRequest where parseJSON = gparseJSON++makeDefault ''CopyMessagesRequest
+ src/Telegram/Bot/API/Methods/DeleteMessages.hs view
@@ -0,0 +1,42 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-}+module Telegram.Bot.API.Methods.DeleteMessages where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Proxy+import GHC.Generics (Generic)+import Servant.API+import Servant.Client hiding (Response)++import Telegram.Bot.API.Internal.TH+import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.MakingRequests+import Telegram.Bot.API.Types++-- ** 'deleteMessages'+++-- | Use this method to delete multiple messages simultaneously.+-- If some of the specified messages can't be found, they are skipped.+-- Returns 'True' on success.+type DeleteMessages = "deleteMessages"+  :> ReqBody '[JSON] DeleteMessagesRequest+  :> Post '[JSON] (Response Bool)++-- | Use this method to delete message in chat.+-- On success, the sent Bool is returned.+deleteMessages :: DeleteMessagesRequest -> ClientM (Response Bool)+deleteMessages = client (Proxy @DeleteMessages)++-- | Request parameters for 'deleteMessages'.+data DeleteMessagesRequest = DeleteMessagesRequest+  { deleteMessagesRequestChatId :: ChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format \@channelusername).+  , deleteMessagesRequestMessageIds :: [MessageId] -- ^ Identifiers of 1-100 messages to delete. See @deleteMessage@ for limitations on which messages can be deleted.+  } deriving Generic++instance ToJSON DeleteMessagesRequest where toJSON = gtoJSON+instance FromJSON DeleteMessagesRequest where parseJSON = gparseJSON++makeDefault ''DeleteMessagesRequest
+ src/Telegram/Bot/API/Methods/ForwardMessages.hs view
@@ -0,0 +1,45 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-}+module Telegram.Bot.API.Methods.ForwardMessages where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Proxy+import GHC.Generics (Generic)+import Servant.API+import Servant.Client hiding (Response)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.MakingRequests+import Telegram.Bot.API.Types+import Telegram.Bot.API.Internal.TH++-- ** 'forwardMessages'++type ForwardMessages+  = "forwardMessages" :> ReqBody '[JSON] ForwardMessagesRequest :> Post '[JSON] (Response [MessageId])++-- | Use this method to forward multiple messages of any kind.+-- If some of the specified messages can't be found or forwarded, they are skipped.+-- Service messages and messages with protected content can't be forwarded.+-- Album grouping is kept for forwarded messages.+-- On success, an array of 'MessageId' of the sent messages is returned.+forwardMessages :: ForwardMessagesRequest -> ClientM (Response [MessageId])+forwardMessages = client (Proxy @ForwardMessages)+++-- | Request parameters for 'forwardMessages'.+data ForwardMessagesRequest = ForwardMessagesRequest+  { forwardMessagesChatId              :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format @\@channelusername).+  , forwardMessagesMessageThreadId     :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.+  , forwardMessagesFromChatId          :: SomeChatId -- ^ Unique identifier for the chat where the original message was sent (or channel username in the format @\@channelusername).+  , forwardMessagesMessageIds          :: [MessageId]  -- ^ Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.+  , forwardMessagesDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.+  , forwardMessagesProtectContent      :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  } deriving (Generic)++instance ToJSON   ForwardMessagesRequest where toJSON = gtoJSON+instance FromJSON ForwardMessagesRequest where parseJSON = gparseJSON++makeDefault ''ForwardMessagesRequest
+ src/Telegram/Bot/API/Methods/GetUserChatBoosts.hs view
@@ -0,0 +1,39 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-}+module Telegram.Bot.API.Methods.GetUserChatBoosts where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Proxy+import GHC.Generics (Generic)+import Servant.API+import Servant.Client hiding (Response)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.MakingRequests+import Telegram.Bot.API.Types+import Telegram.Bot.API.Internal.TH++-- ** 'getUserChatBoosts'++type GetUserChatBoosts+  = "getUserChatBoosts"+  :> ReqBody '[JSON] GetUserChatBoostsRequest+  :> Post '[JSON] (Response UserChatBoosts)++-- | Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a 'UserChatBoosts' object.+getUserChatBoosts :: GetUserChatBoostsRequest -> ClientM (Response UserChatBoosts)+getUserChatBoosts = client (Proxy @GetUserChatBoosts)+++-- | Request parameters for 'getUserChatBoosts'.+data GetUserChatBoostsRequest = GetUserChatBoostsRequest+  { getUserChatBoostsRequestChatId :: SomeChatId -- ^ Unique identifier for the chat or username of the channel (in the format @channelusername).+  , getUserChatBoostsRequestUserId :: UserId -- ^ Unique identifier of the target user.+  } deriving (Generic)++instance ToJSON   GetUserChatBoostsRequest where toJSON = gtoJSON+instance FromJSON GetUserChatBoostsRequest where parseJSON = gparseJSON++makeDefault ''GetUserChatBoostsRequest
src/Telegram/Bot/API/Methods/PromoteChatMember.hs view
@@ -32,6 +32,9 @@   , promoteChatMemberCanChangeInfo :: Maybe Bool -- ^ Pass 'True', if the administrator can change chat title, photo and other settings.   , promoteChatMemberCanInviteUsers :: Maybe Bool -- ^ Pass 'True', if the administrator can invite new users to the chat.   , promoteChatMemberCanPinMessages :: Maybe Bool -- ^ Pass 'True', if the administrator can pin messages, supergroups only.+  , promoteChatMemberCanPostStories :: Maybe Bool -- ^ Pass 'True' if the administrator can post stories in the channel; channels only.+  , promoteChatMemberCanEditStories :: Maybe Bool -- ^ Pass 'True' if the administrator can edit stories posted by other users; channels only.+  , promoteChatMemberCanDeleteStories :: Maybe Bool -- ^ Pass 'True' if the administrator can delete stories posted by other users; channels only.   , promoteChatMemberCanManageTopics :: Maybe Bool -- ^ Pass 'True', if the user is allowed to create, rename, close, and reopen forum topics, supergroups only.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendAnimation.hs view
@@ -51,7 +51,7 @@   , sendAnimationDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendAnimationProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendAnimationReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.-  , sendAnimationAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found.+  , sendAnimationReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendAnimationReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -90,8 +90,8 @@         \t -> Input "protect_content" (bool "false" "true" t)       , sendAnimationReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendAnimationAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendAnimationReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendAnimationReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
src/Telegram/Bot/API/Methods/SendAudio.hs view
@@ -50,7 +50,7 @@   , sendAudioDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendAudioProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendAudioReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendAudioAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendAudioReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendAudioReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -87,8 +87,8 @@         \t -> Input "protect_content" (bool "false" "true" t)       , sendAudioReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendAudioAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendAudioReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendAudioReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
src/Telegram/Bot/API/Methods/SendContact.hs view
@@ -29,7 +29,7 @@   , sendContactDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendContactProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendContactReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendContactAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendContactReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendContactReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendDice.hs view
@@ -26,7 +26,7 @@   , sendDiceDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendDiceProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding   , sendDiceReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendDiceAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendDiceReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendDiceReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendDocument.hs view
@@ -70,7 +70,7 @@   , sendDocumentDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendDocumentProtectContent      :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendDocumentReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.-  , sendDocumentAllowSendingWithoutReply :: Maybe Bool -- ^ Pass 'True', if the message should be sent even if the specified replied-to message is not found.+  , sendDocumentReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendDocumentReplyMarkup :: Maybe SomeReplyMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -106,7 +106,7 @@         $ (maybe id (\t -> ((Input "disable_content_type_detection" (bool "false" "true" t)):)) sendDocumentDisableContentTypeDetection)         $ (maybe id (\t -> ((Input "protect_content" (bool "false" "true" t)):)) sendDocumentProtectContent)         $ (maybe id (\t -> ((Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)):)) sendDocumentReplyToMessageId)-        $ (maybe id (\t -> ((Input "allow_sending_without_reply" (bool "false" "true" t)):)) sendDocumentAllowSendingWithoutReply)+        $ (maybe id (\t -> ((Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)):)) sendDocumentReplyParameters)         $ (maybe id (\t -> ((Input "reply_markup" (TL.toStrict $ encodeToLazyText t)):)) sendDocumentReplyMarkup)         [])     files
src/Telegram/Bot/API/Methods/SendLocation.hs view
@@ -30,7 +30,7 @@   , sendLocationDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendLocationProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendLocationReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendLocationAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendLocationReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendLocationReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendMediaGroup.hs view
@@ -25,7 +25,7 @@   , sendMediaGroupDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendMediaGroupProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendMediaGroupReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendMediaGroupAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendMediaGroupReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendMediaGroupReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendMessage.hs view
@@ -35,11 +35,11 @@   , sendMessageText                  :: Text -- ^ Text of the message to be sent.   , sendMessageParseMode             :: Maybe ParseMode -- ^ Send 'MarkdownV2', 'HTML' or 'Markdown' (legacy), if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.   , sendMessageEntities              :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in message text, which can be specified instead of /parse_mode/.-  , sendMessageDisableWebPagePreview :: Maybe Bool -- ^ Disables link previews for links in this message.+  , sendMessageLinkPreviewOptions    :: Maybe LinkPreviewOptions -- ^ Link preview generation options for the message.   , sendMessageDisableNotification   :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendMessageProtectContent        :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendMessageReplyToMessageId      :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.-  , sendMessageAllowSendingWithoutReply :: Maybe Bool -- ^ Pass 'True', if the message should be sent even if the specified replied-to message is not found.+  , sendMessageReplyParameters       :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendMessageReplyMarkup           :: Maybe SomeReplyMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   } deriving (Generic) 
src/Telegram/Bot/API/Methods/SendPhoto.hs view
@@ -72,7 +72,7 @@   , sendPhotoDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendPhotoProtectContent      :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendPhotoReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.-  , sendPhotoAllowSendingWithoutReply :: Maybe Bool -- ^ Pass 'True', if the message should be sent even if the specified replied-to message is not found.+  , sendPhotoReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendPhotoReplyMarkup :: Maybe SomeReplyMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -94,7 +94,7 @@         $ (maybe id (\t -> ((Input "disable_notification" (bool "false" "true" t)):)) sendPhotoDisableNotification)         $ (maybe id (\t -> ((Input "protect_content" (bool "false" "true" t)):)) sendPhotoProtectContent)         $ (maybe id (\t -> ((Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)):)) sendPhotoReplyToMessageId)-        $ (maybe id (\t -> ((Input "allow_sending_without_reply" (bool "false" "true" t)):)) sendPhotoAllowSendingWithoutReply)+        $ (maybe id (\t -> ((Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)):)) sendPhotoReplyParameters)         $ (maybe id (\t -> ((Input "reply_markup" (TL.toStrict $ encodeToLazyText t)):)) sendPhotoReplyMarkup)         [])     files
src/Telegram/Bot/API/Methods/SendPoll.hs view
@@ -38,7 +38,7 @@   , sendPollDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendPollProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendPollReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendPollAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendPollReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendPollReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendVenue.hs view
@@ -33,7 +33,7 @@   , sendVenueDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendVenueProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendVenueReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendVenueAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendVenueReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendVenueReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic
src/Telegram/Bot/API/Methods/SendVideo.hs view
@@ -52,7 +52,7 @@   , sendVideoDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendVideoProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendVideoReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendVideoAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendVideoReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendVideoReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -93,8 +93,8 @@         \t -> Input "protect_content" (bool "false" "true" t)       , sendVideoReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendVideoAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendVideoReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendVideoReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
src/Telegram/Bot/API/Methods/SendVideoNote.hs view
@@ -44,7 +44,7 @@   , sendVideoNoteDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendVideoNoteProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendVideoNoteReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendVideoNoteAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendVideoNoteReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendVideoNoteReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -69,8 +69,8 @@         \t -> Input "protect_content" (bool "false" "true" t)       , sendVideoNoteReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendVideoNoteAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendVideoNoteReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendVideoNoteReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
src/Telegram/Bot/API/Methods/SendVoice.hs view
@@ -47,7 +47,7 @@   , sendVoiceDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendVoiceProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving   , sendVoiceReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message-  , sendVoiceAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendVoiceReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendVoiceReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -79,8 +79,8 @@         \t -> Input "disable_notification" (bool "false" "true" t)       , sendVoiceReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendVoiceAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendVoiceReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendVoiceReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
+ src/Telegram/Bot/API/Methods/SetMessageReaction.hs view
@@ -0,0 +1,39 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-}+module Telegram.Bot.API.Methods.SetMessageReaction where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Proxy+import GHC.Generics (Generic)+import Servant.API+import Servant.Client hiding (Response)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.MakingRequests+import Telegram.Bot.API.Types+import Telegram.Bot.API.Internal.TH++-- ** 'setMessageReaction'++-- | Request parameters for 'setMessageReaction'+data SetMessageReactionRequest = SetMessageReactionRequest+  { setMessageReactionRequestChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format \@channelusername).+  , setMessageReactionRequestMessageId :: MessageId -- ^ Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.+  , setMessageReactionRequestReaction :: Maybe [ReactionType] -- ^ New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.+  , setMessageReactionRequestIsBig :: Maybe Bool -- ^ Pass 'True' to set the reaction with a big animation.+  }+  deriving Generic++instance ToJSON   SetMessageReactionRequest where toJSON = gtoJSON+instance FromJSON SetMessageReactionRequest where parseJSON = gparseJSON++type SetMessageReaction = "setMessageReaction"+  :> ReqBody '[JSON] SetMessageReactionRequest+  :> Post '[JSON] (Response Bool)++setMessageReaction :: SetMessageReactionRequest -> ClientM (Response Bool)+setMessageReaction = client (Proxy @SetMessageReaction)++makeDefault ''SetMessageReactionRequest
src/Telegram/Bot/API/Payments.hs view
@@ -47,7 +47,7 @@   , sendInvoiceDisableNotification       :: Maybe Bool                 -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendInvoiceProtectContent            :: Maybe Bool                 -- ^ Protects the contents of the sent message from forwarding and saving.   , sendInvoiceReplyToMessageId          :: Maybe MessageId            -- ^ If the message is a reply, ID of the original message.-  , sendInvoiceAllowSendingWithoutReply  :: Maybe Bool                 -- ^ Pass 'True', if the message should be sent even if the specified replied-to message is not found.+  , sendInvoiceReplyParameters           :: Maybe ReplyParameters      -- ^ Description of the message to reply to.   , sendInvoiceReplyMarkup               :: Maybe InlineKeyboardMarkup -- ^ A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.   }   deriving (Generic, Show)
src/Telegram/Bot/API/Stickers.hs view
@@ -52,7 +52,7 @@   , sendStickerDisableNotification      :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.   , sendStickerProtectContent           :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.   , sendStickerReplyToMessageId         :: Maybe MessageId -- ^	If the message is a reply, ID of the original message-  , sendStickerAllowSendingWithoutReply :: Maybe Bool -- ^ Pass True, if the message should be sent even if the specified replied-to message is not found+  , sendStickerReplyParameters          :: Maybe ReplyParameters -- ^ Description of the message to reply to.   , sendStickerReplyMarkup              :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.   }   deriving Generic@@ -75,8 +75,8 @@         \t -> Input "protect_content" (bool "false" "true" t)       , sendStickerReplyToMessageId <&>         \t -> Input "reply_to_message_id" (TL.toStrict $ encodeToLazyText t)-      , sendStickerAllowSendingWithoutReply <&>-        \t -> Input "allow_sending_without_reply" (bool "false" "true" t)+      , sendStickerReplyParameters <&>+        \t -> Input "reply_parameters" (TL.toStrict $ encodeToLazyText t)       , sendStickerReplyMarkup <&>         \t -> Input "reply_markup" (TL.toStrict $ encodeToLazyText t)       ]
src/Telegram/Bot/API/Types.hs view
@@ -23,6 +23,10 @@   , module Telegram.Bot.API.Types.CallbackGame   , module Telegram.Bot.API.Types.CallbackQuery   , module Telegram.Bot.API.Types.Chat+  , module Telegram.Bot.API.Types.ChatBoost+  , module Telegram.Bot.API.Types.ChatBoostRemoved+  , module Telegram.Bot.API.Types.ChatBoostSource+  , module Telegram.Bot.API.Types.ChatBoostUpdated   , module Telegram.Bot.API.Types.ChatAdministratorRights   , module Telegram.Bot.API.Types.ChatInviteLink   , module Telegram.Bot.API.Types.ChatJoinRequest@@ -39,6 +43,7 @@   , module Telegram.Bot.API.Types.Document   , module Telegram.Bot.API.Types.EncryptedCredentials   , module Telegram.Bot.API.Types.EncryptedPassportElement+  , module Telegram.Bot.API.Types.ExternalReplyInfo   , module Telegram.Bot.API.Types.File   , module Telegram.Bot.API.Types.ForceReply   , module Telegram.Bot.API.Types.ForumTopic@@ -48,6 +53,10 @@   , module Telegram.Bot.API.Types.ForumTopicReopened   , module Telegram.Bot.API.Types.Game   , module Telegram.Bot.API.Types.GameHighScore+  , module Telegram.Bot.API.Types.Giveaway+  , module Telegram.Bot.API.Types.GiveawayCompleted+  , module Telegram.Bot.API.Types.GiveawayCreated+  , module Telegram.Bot.API.Types.GiveawayWinners   , module Telegram.Bot.API.Types.GeneralForumTopicHidden   , module Telegram.Bot.API.Types.GeneralForumTopicUnhidden   , module Telegram.Bot.API.Types.InlineKeyboardButton@@ -56,8 +65,9 @@   , module Telegram.Bot.API.Types.Invoice   , module Telegram.Bot.API.Types.KeyboardButton   , module Telegram.Bot.API.Types.KeyboardButtonRequestChat-  , module Telegram.Bot.API.Types.KeyboardButtonRequestUser+  , module Telegram.Bot.API.Types.KeyboardButtonRequestUsers   , module Telegram.Bot.API.Types.LabeledPrice+  , module Telegram.Bot.API.Types.LinkPreviewOptions   , module Telegram.Bot.API.Types.Location   , module Telegram.Bot.API.Types.LoginUrl   , module Telegram.Bot.API.Types.MaskPosition@@ -65,6 +75,9 @@   , module Telegram.Bot.API.Types.Message   , module Telegram.Bot.API.Types.MessageAutoDeleteTimerChanged   , module Telegram.Bot.API.Types.MessageEntity+  , module Telegram.Bot.API.Types.MessageOrigin+  , module Telegram.Bot.API.Types.MessageReactionCountUpdated+  , module Telegram.Bot.API.Types.MessageReactionUpdated   , module Telegram.Bot.API.Types.OrderInfo   , module Telegram.Bot.API.Types.PassportData   , module Telegram.Bot.API.Types.PassportElementError@@ -76,16 +89,22 @@   , module Telegram.Bot.API.Types.PollType   , module Telegram.Bot.API.Types.PreCheckoutQuery   , module Telegram.Bot.API.Types.ProximityAlertTriggered+  , module Telegram.Bot.API.Types.ReactionCount+  , module Telegram.Bot.API.Types.ReactionType   , module Telegram.Bot.API.Types.ReplyKeyboardMarkup   , module Telegram.Bot.API.Types.ReplyKeyboardRemove+  , module Telegram.Bot.API.Types.ReplyParameters   , module Telegram.Bot.API.Types.ResponseParameters   , module Telegram.Bot.API.Types.ShippingAddress   , module Telegram.Bot.API.Types.ShippingOption   , module Telegram.Bot.API.Types.ShippingQuery   , module Telegram.Bot.API.Types.Sticker+  , module Telegram.Bot.API.Types.Story   , module Telegram.Bot.API.Types.SuccessfulPayment   , module Telegram.Bot.API.Types.User+  , module Telegram.Bot.API.Types.UserChatBoosts   , module Telegram.Bot.API.Types.UserProfilePhotos+  , module Telegram.Bot.API.Types.UsersShared   , module Telegram.Bot.API.Types.UserShared   , module Telegram.Bot.API.Types.Venue   , module Telegram.Bot.API.Types.Video@@ -111,6 +130,10 @@ import Telegram.Bot.API.Types.CallbackGame import Telegram.Bot.API.Types.CallbackQuery import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.ChatBoost+import Telegram.Bot.API.Types.ChatBoostRemoved+import Telegram.Bot.API.Types.ChatBoostSource+import Telegram.Bot.API.Types.ChatBoostUpdated import Telegram.Bot.API.Types.ChatAdministratorRights import Telegram.Bot.API.Types.ChatInviteLink import Telegram.Bot.API.Types.ChatJoinRequest@@ -127,6 +150,7 @@ import Telegram.Bot.API.Types.Document import Telegram.Bot.API.Types.EncryptedCredentials import Telegram.Bot.API.Types.EncryptedPassportElement+import Telegram.Bot.API.Types.ExternalReplyInfo import Telegram.Bot.API.Types.File import Telegram.Bot.API.Types.ForceReply import Telegram.Bot.API.Types.ForumTopic@@ -136,6 +160,10 @@ import Telegram.Bot.API.Types.ForumTopicReopened import Telegram.Bot.API.Types.Game import Telegram.Bot.API.Types.GameHighScore+import Telegram.Bot.API.Types.Giveaway+import Telegram.Bot.API.Types.GiveawayCompleted+import Telegram.Bot.API.Types.GiveawayCreated+import Telegram.Bot.API.Types.GiveawayWinners import Telegram.Bot.API.Types.GeneralForumTopicHidden import Telegram.Bot.API.Types.GeneralForumTopicUnhidden import Telegram.Bot.API.Types.InlineKeyboardButton@@ -144,8 +172,9 @@ import Telegram.Bot.API.Types.Invoice import Telegram.Bot.API.Types.KeyboardButton import Telegram.Bot.API.Types.KeyboardButtonRequestChat-import Telegram.Bot.API.Types.KeyboardButtonRequestUser+import Telegram.Bot.API.Types.KeyboardButtonRequestUsers import Telegram.Bot.API.Types.LabeledPrice+import Telegram.Bot.API.Types.LinkPreviewOptions import Telegram.Bot.API.Types.Location import Telegram.Bot.API.Types.LoginUrl import Telegram.Bot.API.Types.MaskPosition@@ -153,6 +182,9 @@ import Telegram.Bot.API.Types.Message import Telegram.Bot.API.Types.MessageAutoDeleteTimerChanged import Telegram.Bot.API.Types.MessageEntity+import Telegram.Bot.API.Types.MessageOrigin+import Telegram.Bot.API.Types.MessageReactionCountUpdated+import Telegram.Bot.API.Types.MessageReactionUpdated import Telegram.Bot.API.Types.OrderInfo import Telegram.Bot.API.Types.PassportData import Telegram.Bot.API.Types.PassportElementError@@ -164,16 +196,22 @@ import Telegram.Bot.API.Types.PollType import Telegram.Bot.API.Types.PreCheckoutQuery import Telegram.Bot.API.Types.ProximityAlertTriggered+import Telegram.Bot.API.Types.ReactionCount+import Telegram.Bot.API.Types.ReactionType import Telegram.Bot.API.Types.ReplyKeyboardMarkup import Telegram.Bot.API.Types.ReplyKeyboardRemove+import Telegram.Bot.API.Types.ReplyParameters import Telegram.Bot.API.Types.ResponseParameters import Telegram.Bot.API.Types.ShippingAddress import Telegram.Bot.API.Types.ShippingOption import Telegram.Bot.API.Types.ShippingQuery import Telegram.Bot.API.Types.Sticker+import Telegram.Bot.API.Types.Story import Telegram.Bot.API.Types.SuccessfulPayment import Telegram.Bot.API.Types.User+import Telegram.Bot.API.Types.UserChatBoosts import Telegram.Bot.API.Types.UserProfilePhotos+import Telegram.Bot.API.Types.UsersShared import Telegram.Bot.API.Types.UserShared import Telegram.Bot.API.Types.Venue import Telegram.Bot.API.Types.Video
src/Telegram/Bot/API/Types/CallbackQuery.hs view
@@ -21,7 +21,7 @@ data CallbackQuery = CallbackQuery   { callbackQueryId              :: CallbackQueryId -- ^ Unique identifier for this query   , callbackQueryFrom            :: User -- ^ Sender-  , callbackQueryMessage         :: Maybe Message -- ^ Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old+  , callbackQueryMessage         :: Maybe Message -- ^ Message sent by the bot with the callback button that originated the query. Use 'isInaccessible' to understand whether a message was deleted or is otherwise inaccessible to the bot.   , callbackQueryInlineMessageId :: Maybe MessageId -- ^ Identifier of the message sent via the bot in inline mode, that originated the query.   , callbackQueryChatInstance    :: Text -- ^ Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.   , callbackQueryData            :: Maybe Text -- ^ Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
src/Telegram/Bot/API/Types/Chat.hs view
@@ -11,6 +11,7 @@ import Telegram.Bot.API.Types.ChatPermissions import Telegram.Bot.API.Types.Common import Telegram.Bot.API.Types.Message+import Telegram.Bot.API.Types.ReactionType import Telegram.Bot.API.Internal.Utils  -- ** Chat@@ -28,7 +29,13 @@   , chatIsForum          :: Maybe Bool      -- ^ 'True', if the supergroup chat is a forum (has topics enabled).   , chatPhoto            :: Maybe ChatPhoto -- ^ Chat photo. Returned only in getChat.   , chatActiveUsernames  :: Maybe Text      -- ^ If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in 'getChat'.+  , chatAvailableReactions :: Maybe [ReactionType] -- ^ List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in 'getChat'.+  , chatAccentColorId    :: Maybe Int -- ^ Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See [accent colors](https://core.telegram.org/bots/api#accent-colors) for more details. Returned only in 'getChat'. Always returned in 'getChat'.+  , chatBackgroundCustomEmojiId :: Maybe Text -- ^ Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in 'getChat'.+  , chatProfileAccentColorId :: Maybe Int -- ^ Identifier of the accent color for the chat's profile background. See [profile accent colors](https://core.telegram.org/bots/api#profile-accent-colors) for more details. Returned only in getChat.+  , chatProfileBackgroundCustomEmojiId :: Maybe Text -- ^ Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in 'getChat'.   , chatEmojiStatusCustomEmojiId :: Maybe Text -- ^ Custom emoji identifier of emoji status of the other party in a private chat. Returned only in 'getChat'.+  , chatEmojiStatusExpirationDate :: Maybe POSIXTime -- ^ Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in 'getChat'.   , chatBio              :: Maybe Text      -- ^ Bio of the other party in a private chat. Returned only in `getChat`.   , chatHasPrivateForwards :: Maybe Bool    -- ^ 'True', if privacy settings of the other party in the private chat allows to use `tg://user?id=<user_id>` links only in chats with the user. Returned only in getChat.   , chatHasRestrictedVoiceAndVideoMessages :: Maybe Bool -- ^ 'True', if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in 'getChat'.@@ -40,7 +47,10 @@   , chatPermissions      :: Maybe ChatPermissions -- ^ Default chat member permissions, for groups and supergroups.   , chatSlowModeDelay    :: Maybe Int       -- ^ For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds.   , chatMessageAutoDeleteTime :: Maybe POSIXTime -- ^ The time after which all messages sent to the chat will be automatically deleted; in seconds.+  , chatHasAggressiveAntiSpamEnabled :: Maybe Bool -- ^ 'True', if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in 'getChat'.+  , chatHasHiddenMembers :: Maybe Bool      -- ^ 'True', if non-administrators can only get the list of bots and administrators in the chat. Returned only in 'getChat'.   , chatHasProtectedContent :: Maybe Bool   -- ^ 'True', if messages from the chat can't be forwarded to other chats.+  , chatHasVisibleHistory :: Maybe Bool     -- ^ 'True', if new chat members will have access to old messages; available only to chat administrators. Returned only in 'getChat'.   , chatStickerSetName   :: Maybe Text      -- ^ For supergroups, name of group sticker set. Returned only in getChat.   , chatCanSetStickerSet :: Maybe Bool      -- ^ True, if the bot can change the group sticker set. Returned only in `getChat`.   , chatLinkedChatId     :: Maybe ChatId    -- ^ Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
src/Telegram/Bot/API/Types/ChatAdministratorRights.hs view
@@ -21,6 +21,9 @@   , chatAdministratorRightsCanPostMessages     :: Maybe Bool -- ^ 'True', if the administrator can post in the channel; channels only.   , chatAdministratorRightsCanEditMessages     :: Maybe Bool -- ^ 'True', if the administrator can edit messages of other users and can pin messages; channels only.   , chatAdministratorRightsCanPinMessages      :: Maybe Bool -- ^ 'True', if the user is allowed to pin messages; groups and supergroups only+  , chatAdministratorRightsCanPostStories      :: Maybe Bool -- ^ 'True', if the administrator can post stories in the channel; channels only.+  , chatAdministratorRightsCanEditStories      :: Maybe Bool -- ^ 'True', if the administrator can edit stories posted by other users; channels only.+  , chatAdministratorRightsCanDeleteStories    :: Maybe Bool -- ^ 'True', if the administrator can delete stories posted by other users; channels only.   , chatAdministratorRightsCanManageTopics     :: Maybe Bool -- ^ 'True', if the user is allowed to create, rename, close, and reopen forum topics; supergroups only.   }   deriving (Generic, Show)
+ src/Telegram/Bot/API/Types/ChatBoost.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ChatBoost where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.ChatBoostSource+import Telegram.Bot.API.Types.Common++-- ** 'ChatBoost'++-- | This object contains information about a chat boost.+data ChatBoost = ChatBoost+  { chatBoostBoostId :: BoostId -- ^ Unique identifier of the boost.+  , chatBoostAddTime :: POSIXTime -- ^ Point in time (Unix timestamp) when the chat was boosted.+  , chatBoostExpirateionDate :: POSIXTime -- ^ Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged.+  , chatBoostSource :: ChatBoostSource -- ^ Source of the added boost.+  }+  deriving (Generic, Show)++instance ToJSON   ChatBoost where toJSON = gtoJSON+instance FromJSON ChatBoost where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/ChatBoostRemoved.hs view
@@ -0,0 +1,25 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ChatBoostRemoved where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.ChatBoostSource+import Telegram.Bot.API.Types.Common++-- ** 'ChatBoostRemoved'++-- | This object represents a boost removed from a chat.+data ChatBoostRemoved = ChatBoostRemoved+  { chatBoostRemovedChat :: Chat -- ^ Chat which was boosted.+  , chatBoostRemovedBoostId :: BoostId -- ^ Unique identifier of the boost.+  , chatBoostRemovedRemoveDate :: POSIXTime -- ^ Point in time (Unix timestamp) when the boost was removed.+  , chatBoostRemovedSource :: ChatBoostSource -- ^ Source of the removed boost.+  }+  deriving (Generic, Show)++instance ToJSON   ChatBoostRemoved where toJSON = gtoJSON+instance FromJSON ChatBoostRemoved where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/ChatBoostSource.hs view
@@ -0,0 +1,73 @@+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+module Telegram.Bot.API.Types.ChatBoostSource where++import Data.Aeson (FromJSON (..), ToJSON (..), KeyValue ((.=)), Value (..), withObject, (.:))+import Data.Aeson.Types (Parser)+import Data.Text (Text)+import GHC.Generics (Generic)++import qualified Data.Text as Text++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.User++-- ** 'ChatBoostSource'++-- | This object describes the source of a chat boost. It can be one of+--+-- * ChatBoostSourcePremium+-- * ChatBoostSourceGiftCode+-- * ChatBoostSourceGiveaway+data ChatBoostSource+  -- | The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.+  = ChatBoostSourcePremium+      { chatBoostSourcePremiumSource :: Text -- ^ Source of the boost, always “premium”.+      , chatBoostSourcePremiumUser :: User -- ^ User that boosted the chat.+      }+  -- | The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.+  | ChatBoostSourceGiftCode+      { chatBoostSourceGiftCodeSource :: Text -- ^ Source of the boost, always “gift_code”.+      , chatBoostSourceGiftCodeUser :: User -- ^ User for which the gift code was created.+      }+  -- | The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.+  | ChatBoostSourceGiveaway+      { chatBoostSourceGiveawaySource :: Text -- ^ Source of the boost, always “giveaway”.+      , chatBoostSourceGiveawayGiveawayMessageId :: MessageId -- ^ Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.+      , chatBoostSourceGiveawayUser :: Maybe User -- ^ User that won the prize in the giveaway if any+      , chatBoostSourceGiveawayIsUnclaimed :: Maybe Bool -- ^ 'True', if the giveaway was completed, but there was no user to win the prize+      }+  deriving (Generic, Show)++instance ToJSON ChatBoostSource where+  toJSON = \case+    ChatBoostSourcePremium _s u -> addJsonFields (Object mempty)+      ["source" .= ("premium" :: Text), "user" .= u]+    ChatBoostSourceGiftCode _s u -> addJsonFields (Object mempty)+      ["source" .= ("gift_code" :: Text), "user" .= u]+    ChatBoostSourceGiveaway _s gm u iu -> addJsonFields (Object mempty)+      [ "source" .= ("giveaway" :: Text)+      , "giveaway_message_id" .= gm+      , "user" .= u+      , "is_unclaimed" .= iu+      ]+      ++instance FromJSON ChatBoostSource where+  parseJSON = withObject "ChatBoostSource" \o ->+    (o .: "source" :: Parser Text) >>= \case+    "premium" -> ChatBoostSourcePremium+      <$> o .: "source"+      <*> o .: "user"+    "gift_code" -> ChatBoostSourceGiftCode+      <$> o .: "source"+      <*> o .: "user"+    "giveaway" -> ChatBoostSourceGiveaway+      <$> o .: "source"+      <*> o .: "giveaway_message_id"+      <*> o .: "user"+      <*> o .: "is_unclaimed"+    t -> fail $ Text.unpack ("Unknown source: " <> t)
+ src/Telegram/Bot/API/Types/ChatBoostUpdated.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ChatBoostUpdated where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.ChatBoost++-- ** 'ChatBoostUpdated'++-- | This object represents a boost added to a chat or changed.+data ChatBoostUpdated = ChatBoostUpdated+  { chatBoostUpdatedChat :: Chat -- ^ Chat which was boosted.+  , chatBoostUpdatedBoost :: ChatBoost -- ^ Infomation about the chat boost.+  }+  deriving (Generic, Show)++instance ToJSON   ChatBoostUpdated where toJSON = gtoJSON+instance FromJSON ChatBoostUpdated where parseJSON = gparseJSON
src/Telegram/Bot/API/Types/ChatMember.hs view
@@ -33,6 +33,9 @@   , chatMemberCanChangeInfo         :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can change the chat title, photo and other settings.   , chatMemberCanPostMessages       :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can post in the channel, channels only.   , chatMemberCanEditMessages       :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can edit messages of other users and can pin messages, channels only.+  , chatMemberCanPostStories        :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can post stories in the channel; channels only.+  , chatMemberCanEditStories        :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can edit stories posted by other users; channels only.+  , chatMemberCanDeleteStories        :: Maybe Bool -- ^ Administrators only. 'True', if the administrator can delete stories posted by other users; channels only.    -- administrator, restricted   , chatMemberCanInviteUsers        :: Maybe Bool -- ^ Administrators and restricted only. 'True', if the administrator can invite new users to the chat.
src/Telegram/Bot/API/Types/Common.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeApplications #-} module Telegram.Bot.API.Types.Common where @@ -31,6 +33,10 @@ instance ToHttpApiData UserId where   toUrlPiece = pack . show @Integer . coerce +-- | Unique identifier of the boost.+newtype BoostId = BoostId Text+  deriving (Eq, Show, Generic, ToJSON, FromJSON)+ -- | Unique identifier for this chat. newtype ChatId = ChatId Integer   deriving (Eq, Show, ToJSON, FromJSON, Hashable)@@ -78,7 +84,7 @@ data SomeChatId   = SomeChatId ChatId       -- ^ Unique chat ID.   | SomeChatUsername Text   -- ^ Username of the target channel.-  deriving (Generic)+  deriving (Generic, Show)  instance ToJSON   SomeChatId where toJSON = genericSomeToJSON instance FromJSON SomeChatId where parseJSON = genericSomeParseJSON
+ src/Telegram/Bot/API/Types/ExternalReplyInfo.hs view
@@ -0,0 +1,62 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ExternalReplyInfo where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Animation+import Telegram.Bot.API.Types.Audio+import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.Contact+import Telegram.Bot.API.Types.Dice+import Telegram.Bot.API.Types.Game+import Telegram.Bot.API.Types.Document+import Telegram.Bot.API.Types.Invoice+import Telegram.Bot.API.Types.Location+import Telegram.Bot.API.Types.MessageOrigin+import Telegram.Bot.API.Types.PhotoSize+import Telegram.Bot.API.Types.Poll+import Telegram.Bot.API.Types.Sticker+import Telegram.Bot.API.Types.Story+import Telegram.Bot.API.Types.Venue+import Telegram.Bot.API.Types.Video+import Telegram.Bot.API.Types.VideoNote+import Telegram.Bot.API.Types.Voice+++-- ** 'ExternalReplyInfo'++-- | This object contains information about a message that is being replied to, which may come from another chat or forum topic.+data ExternalReplyInfo = ExternalReplyInfo+      { externalReplyInfoOrigin :: MessageOrigin -- ^ Origin of the message replied to by the given message.+      , externalReplyInfoChat :: Maybe Chat -- ^ Chat the original message belongs to. Available only if the chat is a supergroup or a channel.+      , externalReplyInfoMessageId :: Maybe MessageId -- ^ Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.++      -- , externalReplyInfoLinkPreviewsOptions+      , externalReplyInfoAnimation :: Maybe Animation -- ^ Message is an animation, information about the animation.+      , externalReplyInfoAudio :: Maybe Audio -- ^ Message is an audio file, information about the file.+      , externalReplyInfoDocument :: Maybe Document -- ^ Message is a general file, information about the file.+      , externalReplyInfoPhoto :: Maybe [PhotoSize] -- ^ Message is a photo, available sizes of the photo.+      , externalReplyInfoSticker :: Maybe Sticker -- ^ Message is a sticker, information about the sticker.+      , externalReplyInfoStory :: Maybe Story -- ^ Message is a forwarded story.+      , externalReplyInfoVideo :: Maybe Video -- ^ Message is a video, information about the video.+      , externalReplyInfoVideoNote :: Maybe VideoNote -- ^ Message is a video note, information about the video message+      , externalReplyInfoVoice :: Maybe Voice -- ^ Message is a voice message, information about the file+      , externalReplyInfoHasMediaSpoiler :: Maybe Bool -- ^ 'True', if the message media is covered by a spoiler animation.+      , externalReplyInfoContact :: Maybe Contact -- ^ Message is a shared contact, information about the contact.+      , externalReplyInfoDice :: Maybe Dice -- ^ Message is a dice with random value.+      , externalReplyInfoGame :: Maybe Game -- ^ Message is a game, information about the game.++      -- , externalReplyInfoGiveaway+      -- , externalReplyInfoGiveawayWinners+      , externalReplyInfoInvoice :: Maybe Invoice -- ^ Message is an invoice for a payment, information about the invoice.+      , externalReplyInfoLocation :: Maybe Location -- ^ Message is a shared location, information about the location.+      , externalReplyInfoPoll :: Maybe Poll -- ^ Message is a native poll, information about the poll.+      , externalReplyInfoVenue :: Maybe Venue -- ^ Message is a venue, information about the venue.+      }+  deriving (Generic, Show)++instance ToJSON   ExternalReplyInfo where toJSON = gtoJSON+instance FromJSON ExternalReplyInfo where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/ExternalReplyInfo.hs-boot view
@@ -0,0 +1,11 @@+module Telegram.Bot.API.Types.ExternalReplyInfo where++import Data.Aeson++data ExternalReplyInfo++instance Show ExternalReplyInfo++instance FromJSON ExternalReplyInfo++instance ToJSON ExternalReplyInfo
+ src/Telegram/Bot/API/Types/Giveaway.hs view
@@ -0,0 +1,28 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.Giveaway where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Text+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Chat++-- ** 'Giveaway'++-- | This object represents a message about a scheduled giveaway.+data Giveaway = Giveaway+  { giveawayChats :: [Chat] -- ^ The list of chats which the user must join to participate in the giveaway+  , giveawayWinnersSelectionDate :: POSIXTime -- ^ Point in time (Unix timestamp) when winners of the giveaway will be selected.+  , giveawayWinnerCount :: Int -- ^ The number of users which are supposed to be selected as winners of the giveaway.+  , giveawayOnlyNewMembers :: Maybe Bool -- ^ 'True', if only users who join the chats after the giveaway started should be eligible to win.+  , giveawayHasPublicWinners :: Maybe Bool -- ^ 'True', if the list of giveaway winners will be visible to everyone.+  , giveawayPrizeDescription :: Maybe Text -- ^ Description of additional giveaway prize.+  , giveawayCountryCodes :: Maybe [Text] -- ^ A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.+  , giveawayPremiumSubscriptionMonthCount :: Maybe Int -- ^ The number of months the Telegram Premium subscription won from the giveaway will be active for.+  }+  deriving (Generic, Show)++instance ToJSON   Giveaway where toJSON = gtoJSON+instance FromJSON Giveaway where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/Giveaway.hs-boot view
@@ -0,0 +1,11 @@+module Telegram.Bot.API.Types.Giveaway where++import Data.Aeson++data Giveaway++instance Show Giveaway++instance FromJSON Giveaway++instance ToJSON Giveaway
+ src/Telegram/Bot/API/Types/GiveawayCompleted.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.GiveawayCompleted where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.Message++-- ** 'GiveawayCompleted'++-- | This object represents a service message about the completion of a giveaway without public winners.+data GiveawayCompleted = GiveawayCompleted+  { giveawayCompletedWinnerCount :: Int -- ^ Number of winners in the giveaway.+  , giveawayCompletedUnclaimedPrizeCount :: Maybe Int -- ^ Number of undistributed prizes.+  , giveawayCompletedGiveawayMessage :: Maybe Message -- ^ Message with the giveaway that was completed, if it wasn't deleted.+  }+  deriving (Generic, Show)++instance ToJSON   GiveawayCompleted where toJSON = gtoJSON+instance FromJSON GiveawayCompleted where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/GiveawayCompleted.hs-boot view
@@ -0,0 +1,11 @@+module Telegram.Bot.API.Types.GiveawayCompleted where++import Data.Aeson++data GiveawayCompleted++instance Show GiveawayCompleted++instance FromJSON GiveawayCompleted++instance ToJSON GiveawayCompleted
+ src/Telegram/Bot/API/Types/GiveawayCreated.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.GiveawayCreated where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils++-- ** 'GiveawayCreated'++-- | This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.+data GiveawayCreated = GiveawayCreated+  { +  }+  deriving (Generic, Show)++instance ToJSON   GiveawayCreated where toJSON = gtoJSON+instance FromJSON GiveawayCreated where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/GiveawayWinners.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.GiveawayWinners where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Text+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import {-# SOURCE #-} Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.User++-- ** 'GiveawayWinners'++-- | This object represents a message about the completion of a giveaway with public winners.+data GiveawayWinners = GiveawayWinners+  { giveawayWinnersChat :: Chat -- ^ The chat that created the giveaway.+  , giveawayWinnersGiveawayMessageId :: MessageId -- ^ Identifier of the messsage with the giveaway in the chat.+  , giveawayWinnersWinnersSelectionDate :: POSIXTime -- ^ Point in time (Unix timestamp) when winners of the giveaway were selected.+  , giveawayWinnersWinnerCount :: Int -- ^ Total number of winners in the giveaway.+  , giveawayWinnersWinners :: [User] -- ^ List of up to 100 winners of the giveaway.+  , giveawayWinnersAdditionalChatCount :: Maybe Int -- ^ The number of other chats the user had to join in order to be eligible for the giveaway.+  , giveawayWinnersPremiumSubscriptionMonthCount :: Maybe Int -- ^ The number of months the Telegram Premium subscription won from the giveaway will be active for.+  , giveawayWinnersUnclaimedPrizeCount :: Maybe Int -- ^ Number of undistributed prizes.+  , giveawayWinnersOnlyNewMembers :: Maybe Bool -- ^ 'True', if only users who had joined the chats after the giveaway started were eligible to win.+  , giveawayWinnersWasRefunded :: Maybe Bool -- ^ 'True', if the giveaway was canceled because the payment for it was refunded.+  , giveawayWinnersPrizeDescription :: Maybe Text -- ^ Description of additional giveaway prize.+  }+  deriving (Generic, Show)++instance ToJSON   GiveawayWinners where toJSON = gtoJSON+instance FromJSON GiveawayWinners where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/GiveawayWinners.hs-boot view
@@ -0,0 +1,11 @@+module Telegram.Bot.API.Types.GiveawayWinners where++import Data.Aeson++data GiveawayWinners++instance Show GiveawayWinners++instance FromJSON GiveawayWinners++instance ToJSON GiveawayWinners
src/Telegram/Bot/API/Types/KeyboardButton.hs view
@@ -8,7 +8,7 @@  import Telegram.Bot.API.Types.Common import Telegram.Bot.API.Types.KeyboardButtonRequestChat-import Telegram.Bot.API.Types.KeyboardButtonRequestUser+import Telegram.Bot.API.Types.KeyboardButtonRequestUsers import Telegram.Bot.API.Types.PollType import Telegram.Bot.API.Internal.Utils @@ -19,7 +19,7 @@ -- to specify text of the button. Optional fields are mutually exclusive. data KeyboardButton = KeyboardButton   { keyboardButtonText            :: Text       -- ^ Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.-  , keyboardButtonRequestUser     :: Maybe KeyboardButtonRequestUser -- ^ If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.+  , keyboardButtonRequestUsers    :: Maybe KeyboardButtonRequestUsers -- ^ If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.   , keyboardButtonRequestChat     :: Maybe KeyboardButtonRequestChat -- ^ If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.   , keyboardButtonRequestContact  :: Maybe Bool -- ^ If 'True', the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.   , keyboardButtonRequestLocation :: Maybe Bool -- ^ If 'True', the user's current location will be sent when the button is pressed. Available in private chats only.
− src/Telegram/Bot/API/Types/KeyboardButtonRequestUser.hs
@@ -1,21 +0,0 @@-{-# LANGUAGE DeriveGeneric #-}-module Telegram.Bot.API.Types.KeyboardButtonRequestUser where--import Data.Aeson (FromJSON (..), ToJSON (..))-import GHC.Generics (Generic)--import Telegram.Bot.API.Types.Common-import Telegram.Bot.API.Internal.Utils---- ** 'KeyboardButtonRequestUser'---- | This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.-data KeyboardButtonRequestUser = KeyboardButtonRequestUser-  { keyboardButtonRequestUserRequestId :: RequestId -- ^ Signed 32-bit identifier of the request, which will be received back in the 'UserShared' object. Must be unique within the message-  , keyboardButtonRequestUserUserIsBot :: Maybe Bool -- ^ Pass 'True' to request a bot, pass 'False' to request a regular user. If not specified, no additional restrictions are applied.-  , keyboardButtonRequestUserUserIsPremium :: Maybe Bool -- ^ Pass 'True' to request a premium user, pass 'False' to request a non-premium user. If not specified, no additional restrictions are applied.-  }-  deriving (Generic, Show)--instance ToJSON   KeyboardButtonRequestUser where toJSON = gtoJSON-instance FromJSON KeyboardButtonRequestUser where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/KeyboardButtonRequestUsers.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.KeyboardButtonRequestUsers where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Internal.Utils++-- ** 'KeyboardButtonRequestUsers'++-- | This object defines the criteria used to request suitable users. +-- The identifiers of the selected users will be shared with the bot when the corresponding button is pressed.+-- [More about requesting users »](https://core.telegram.org/bots/features#chat-and-user-selection)+data KeyboardButtonRequestUsers = KeyboardButtonRequestUsers+  { keyboardButtonRequestUsersRequestId :: RequestId -- ^ Signed 32-bit identifier of the request, which will be received back in the 'UserShared' object. Must be unique within the message+  , keyboardButtonRequestUsersUserIsBot :: Maybe Bool -- ^ Pass 'True' to request a bot, pass 'False' to request a regular user. If not specified, no additional restrictions are applied.+  , keyboardButtonRequestUsersUserIsPremium :: Maybe Bool -- ^ Pass 'True' to request a premium user, pass 'False' to request a non-premium user. If not specified, no additional restrictions are applied.+  , keyboardButtonRequestUsersMaxQuantity :: Maybe Int -- ^ The maximum number of users to be selected; 1-10. Defaults to 1.+  }+  deriving (Generic, Show)++instance ToJSON   KeyboardButtonRequestUsers where toJSON = gtoJSON+instance FromJSON KeyboardButtonRequestUsers where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/LinkPreviewOptions.hs view
@@ -0,0 +1,22 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.LinkPreviewOptions where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Text (Text)+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils++-- ** 'LinkPreviewOptions'++data LinkPreviewOptions = LinkPreviewOptions+  { linkPreviewOptionsIsDisabled :: Maybe Bool -- ^ 'True', if the link preview is disabled.+  , linkPreviewOptionsUrl :: Maybe Text -- ^ URL to use for the link preview. If empty, then the first URL found in the message text will be used.+  , linkPreviewOptionsPreferSmallMedia :: Maybe Bool -- ^ 'True', if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview.+  , linkPreviewOptionsPreferLargeMedia :: Maybe Bool -- ^ 'True', if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview.+  , linkPreviewOptionsShowAboveText :: Maybe Bool -- ^ 'True', if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text.+  }+  deriving (Generic, Show)++instance ToJSON   LinkPreviewOptions where toJSON = gtoJSON+instance FromJSON LinkPreviewOptions where parseJSON = gparseJSON
src/Telegram/Bot/API/Types/Message.hs view
@@ -14,13 +14,21 @@ import Telegram.Bot.API.Types.Common import Telegram.Bot.API.Types.Contact import Telegram.Bot.API.Types.Dice+import {-# SOURCE #-} Telegram.Bot.API.Types.ExternalReplyInfo import Telegram.Bot.API.Types.ForumTopicEdited import Telegram.Bot.API.Types.ForumTopicClosed import Telegram.Bot.API.Types.ForumTopicCreated import Telegram.Bot.API.Types.ForumTopicReopened import Telegram.Bot.API.Types.Game+import Telegram.Bot.API.Types.GeneralForumTopicHidden+import Telegram.Bot.API.Types.GeneralForumTopicUnhidden+import {-# SOURCE #-} Telegram.Bot.API.Types.Giveaway+import {-# SOURCE #-} Telegram.Bot.API.Types.GiveawayCompleted+import Telegram.Bot.API.Types.GiveawayCreated+import {-# SOURCE #-} Telegram.Bot.API.Types.GiveawayWinners import Telegram.Bot.API.Types.InlineKeyboardMarkup import Telegram.Bot.API.Types.Invoice+import Telegram.Bot.API.Types.LinkPreviewOptions import Telegram.Bot.API.Types.Location import Telegram.Bot.API.Types.MessageAutoDeleteTimerChanged import Telegram.Bot.API.Types.MessageEntity@@ -29,9 +37,11 @@ import Telegram.Bot.API.Types.Poll import Telegram.Bot.API.Types.ProximityAlertTriggered import Telegram.Bot.API.Types.Sticker+import Telegram.Bot.API.Types.Story import Telegram.Bot.API.Types.SuccessfulPayment+import Telegram.Bot.API.Types.TextQuote import Telegram.Bot.API.Types.User-import Telegram.Bot.API.Types.UserShared+import Telegram.Bot.API.Types.UsersShared import Telegram.Bot.API.Types.Venue import Telegram.Bot.API.Types.Video import Telegram.Bot.API.Types.VideoChatEnded@@ -62,6 +72,8 @@   , messageIsTopicMessage        :: Maybe Bool -- ^ 'True', if the message is sent to a forum topic.   , messageIsAutomaticForward    :: Maybe Bool -- ^ 'True', if the message is a channel post that was automatically forwarded to the connected discussion group.   , messageReplyToMessage        :: Maybe Message -- ^ For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.+  , messageExternalReply         :: Maybe ExternalReplyInfo -- ^ Information about the message that is being replied to, which may come from another chat or forum topic.+  , quote                        :: Maybe TextQuote -- ^ For replies that quote part of the original message, the quoted part of the message.   , messageViaBot                :: Maybe User -- ^ Bot through which the message was sent.   , messageEditDate              :: Maybe POSIXTime -- ^ Date the message was last edited in Unix time   , messageHasProtectedContent   :: Maybe Bool -- ^ 'True', if the message can't be forwarded.@@ -69,11 +81,13 @@   , messageAuthorSignature       :: Maybe Text -- ^ Signature of the post author for messages in channels   , messageText                  :: Maybe Text -- ^ For text messages, the actual UTF-8 text of the message, 0-4096 characters.   , messageEntities              :: Maybe [MessageEntity] -- ^ For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text+  , messageLinkPreviewOptions    :: Maybe LinkPreviewOptions -- ^ Options used for link preview generation for the message, if it is a text message and link preview options were changed.   , messageAnimation             :: Maybe Animation -- ^ Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set.   , messageAudio                 :: Maybe Audio -- ^ Message is an audio file, information about the file   , messageDocument              :: Maybe Document -- ^ Message is a general file, information about the file.   , messagePhoto                 :: Maybe [PhotoSize] -- ^ Message is a photo, available sizes of the photo   , messageSticker               :: Maybe Sticker -- ^ Message is a sticker, information about the sticker+  , messageStory                 :: Maybe Story -- ^ Message is a forwarded story.   , messageVideo                 :: Maybe Video -- ^ Message is a video, information about the video   , messageVideoNote             :: Maybe VideoNote -- ^ Message is a video note, information about the video message   , messageVoice                 :: Maybe Voice -- ^ Message is a voice message, information about the file@@ -99,10 +113,10 @@   , messageHasHiddenMembers      :: Maybe Bool -- ^ 'True', if non-administrators can only get the list of bots and administrators in the chat. Returned only in 'getChat'.   , messageMigrateToChatId       :: Maybe ChatId -- ^ The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.   , messageMigrateFromChatId     :: Maybe ChatId -- ^ The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.-  , messagePinnedMessage         :: Maybe Message -- ^ Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.+  , messagePinnedMessage         :: Maybe Message -- ^ Specified message was pinned. Note that the Message object in this field will not contain further @reply_to_message@ fields even if it itself is a reply. Use 'isInaccessibleMessage' to understand whether a message was deleted or is otherwise inaccessible to the bot.   , messageInvoice               :: Maybe Invoice -- ^ Message is an invoice for a payment, information about the invoice.   , messageSuccessfulPayment     :: Maybe SuccessfulPayment -- ^ Message is a service message about a successful payment, information about the payment.-  , messageUserShared            :: Maybe UserShared -- ^ Service message: a user was shared with the bot.+  , messageUsersShared           :: Maybe UsersShared -- ^ Service message: users were shared with the bot.   , messageChatShared            :: Maybe ChatShared -- ^ Service message: a chat was shared with the bot.   , messageConnectedWebsite      :: Maybe Text -- ^ The domain name of the website on which the user has logged in.   , messageWriteAccessAllowed    :: Maybe WriteAccessAllowed -- ^ Service message: the user allowed the bot added to the attachment menu to write messages.@@ -112,6 +126,12 @@   , messageForumTopicEdited     :: Maybe ForumTopicEdited -- ^ Service message: forum topic edited.   , messageForumTopicClosed     :: Maybe ForumTopicClosed -- ^ Service message: forum topic closed.   , messageForumTopicReopened     :: Maybe ForumTopicReopened -- ^ Service message: forum topic reopened.+  , messageGeneralForumTopicHidden :: Maybe GeneralForumTopicHidden -- ^ Service message: the 'General' forum topic hidden.+  , messageGeneralForumTopicUnhidden :: Maybe GeneralForumTopicUnhidden -- ^ Service message: the 'General' forum topic unhidden+  , messageGiveawayCreated       :: Maybe GiveawayCreated -- ^ Service message: a scheduled giveaway was created.+  , messageGiveaway              :: Maybe Giveaway -- ^ The message is a scheduled giveaway message.+  , messageGiveawayWinners       :: Maybe GiveawayWinners -- ^ A giveaway with public winners was completed.+  , messageGiveawayCompleted     :: Maybe GiveawayCompleted -- ^ Service message: a giveaway without public winners was completed.   , messageVideoChatScheduled    :: Maybe VideoChatScheduled -- ^ Service message: video chat scheduled.   , messageVideoChatStarted      :: Maybe VideoChatStarted -- ^ Service message: video chat started   , messageVideoChatEnded        :: Maybe VideoChatEnded -- ^ Service message: video chat ended.@@ -123,3 +143,6 @@  instance ToJSON   Message where toJSON = gtoJSON instance FromJSON Message where parseJSON = gparseJSON++isInaccessibleMessage :: Message -> Bool+isInaccessibleMessage = (== 0) . messageDate
+ src/Telegram/Bot/API/Types/MessageOrigin.hs view
@@ -0,0 +1,97 @@+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+module Telegram.Bot.API.Types.MessageOrigin where++import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), (.=), (.:), withObject)+import Data.Aeson.Types (Parser)+import Data.Text (Text)+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import qualified Data.Text as Text++import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.User+import Telegram.Bot.API.Internal.Utils++-- ** 'MessageOrigin'++-- | This object describes the origin of a message. It can be one of+--+-- * MessageOriginUser+-- * MessageOriginHiddenUser+-- * MessageOriginChat+-- * MessageOriginChannel+--+data MessageOrigin+  -- | The message was originally sent by a known user.+  = MessageOriginUser+      { messageOriginUserType :: Text -- ^ Type of the message origin, always “user”.+      , messageOriginUserDate :: POSIXTime -- ^ Date the message was sent originally in Unix time.+      , messageOriginUserSenderUser :: User -- ^ User that sent the message originally.+      }+  -- | The message was originally sent by an unknown user.+  | MessageOriginHiddenUser+      { messageOriginHiddenUserType :: Text -- ^ Type of the message origin, always “hidden_user”.+      , messageOriginHiddenUserDate :: POSIXTime -- ^ Date the message was sent originally in Unix time.+      , messageOriginHiddenUserSenderUserName :: Text -- ^ Name of the user that sent the message originally.+      }+  -- | The message was originally sent on behalf of a chat to a group chat.+  | MessageOriginChat+      { messageOriginChatType :: Text -- ^ Type of the message origin, always “chat”.+      , messageOriginChatDate :: POSIXTime -- ^ Date the message was sent originally in Unix time.+      , messageOriginChatSenderChat :: Chat -- ^ Chat that sent the message originally.+      , messageOriginChatAuthorSignature :: Maybe Text -- ^ For messages originally sent by an anonymous chat administrator, original message author signature.+      }+  -- | The message was originally sent to a channel chat.+  | MessageOriginChannel+      { messageOriginChannelType :: Text -- ^ Type of the message origin, always “channel”.+      , messageOriginChannelDate :: POSIXTime -- ^ Date the message was sent originally in Unix time.+      , messageOriginChannelChat :: Chat -- ^ Channel chat to which the message was originally sent.+      , messageOriginChannelMessageId :: MessageId -- ^ Unique message identifier inside the chat.+      , messageOriginChannelAuthorSignature :: Maybe Text -- ^ Signature of the original post author.+      }+  deriving (Generic, Show)++instance ToJSON   MessageOrigin where+  toJSON = \case+    MessageOriginUser _t d su -> addJsonFields+      (Object mempty)+      (addType "user" [ "date" .= d, "sender_user" .= su ])+    MessageOriginHiddenUser _t d sun -> addJsonFields+      (Object mempty)+      (addType "hidden_user" [ "date" .= d, "sender_user_name" .= sun ])+    MessageOriginChat _t d sc as -> addJsonFields+      (Object mempty)+      (addType "chat" [ "date" .= d, "sender_chat" .= sc, "author_signature" .= as ])+    MessageOriginChannel _t d c m as -> addJsonFields+      (Object mempty)+      (addType "channel" [ "date" .= d, "chat" .= c, "message_id" .= m, "author_signature" .= as])++instance FromJSON MessageOrigin where+  parseJSON = withObject "MessageOrigin" \o ->+    (o .: "type" :: Parser Text) >>= \case+    "user" -> MessageOriginUser+      <$> o .: "type"+      <*> o .: "date"+      <*> o .: "sender_user"+    "hidden_user" -> MessageOriginHiddenUser+      <$> o .: "type"+      <*> o .: "date"+      <*> o .: "sender_user_name"+    "chat" -> MessageOriginChat+      <$> o .: "type"+      <*> o .: "date"+      <*> o .: "sender_chat"+      <*> o .: "author_signature"+    "channel" -> MessageOriginChannel+      <$> o .: "type"+      <*> o .: "date"+      <*> o .: "chat"+      <*> o .: "message_id"+      <*> o .: "author_signature"+    t -> fail $ Text.unpack ("Unknown type: " <> t)+
+ src/Telegram/Bot/API/Types/MessageReactionCountUpdated.hs view
@@ -0,0 +1,25 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.MessageReactionCountUpdated where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.ReactionCount+import Telegram.Bot.API.Internal.Utils++-- ** 'MessageReactionCountUpdated'++-- | This object represents reaction changes on a message with anonymous reactions.+data MessageReactionCountUpdated = MessageReactionCountUpdated+  { messageReactionCountUpdatedChat :: Chat -- ^ The chat containing the message.+  , messageReactionCountUpdatedMessageId :: MessageId -- ^ Unique message identifier inside the chat.+  , messageReactionCountUpdatedDate :: POSIXTime -- ^ Date of the change in Unix time.+  , messageReactionCountUpdatedReactions :: [ReactionCount] -- ^ List of reactions that are present on the message.+  }+  deriving (Generic, Show)++instance ToJSON   MessageReactionCountUpdated where toJSON = gtoJSON+instance FromJSON MessageReactionCountUpdated where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/MessageReactionUpdated.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.MessageReactionUpdated where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Time.Clock.POSIX (POSIXTime)+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.Chat+import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.ReactionType+import Telegram.Bot.API.Types.User+import Telegram.Bot.API.Internal.Utils++-- ** 'MessageReactionUpdated'++-- | This object represents a change of a reaction on a message performed by a user.+data MessageReactionUpdated = MessageReactionUpdated+  { messageReactionUpdatedChat :: Chat -- ^ The chat containing the message.+  , messageReactionUpdatedMessageId :: MessageId -- ^ Unique message identifier inside the chat.+  , messageReactionUpdatedUser :: Maybe User -- ^ The user that changed the reaction, if the user isn't anonymous.+  , messageReactionUpdatedActorChat :: Maybe Chat -- ^ The chat on behalf of which the reaction was changed, if the user is anonymous.+  , messageReactionUpdatedDate :: POSIXTime -- ^ Date of the change in Unix time.+  , messageReactionUpdatedOldReaction :: [ReactionType] -- ^ Previous list of reaction types that were set by the user.+  , messageReactionUpdatedNewReaction :: [ReactionType] -- ^ New list of reaction types that have been set by the user.+  }+  deriving (Generic, Show)++instance ToJSON   MessageReactionUpdated where toJSON = gtoJSON+instance FromJSON MessageReactionUpdated where parseJSON = gparseJSON
src/Telegram/Bot/API/Types/ParseMode.hs view
@@ -8,7 +8,7 @@   = Markdown   | HTML   | MarkdownV2-  deriving (Generic)+  deriving (Generic, Show)  instance ToJSON   ParseMode instance FromJSON ParseMode
src/Telegram/Bot/API/Types/PassportElementError.hs view
@@ -32,7 +32,7 @@  data PassportElementError   = PassportElementError-    { passportElementErroSource       :: PassportErrorSource -- ^ Error source, must be one of 'PassportErrorSource'.+    { passportElementErrorSource      :: PassportErrorSource -- ^ Error source, must be one of 'PassportErrorSource'.     , passportElementErrorType        :: PassportElementType -- ^ The section of the user's Telegram Passport which has the error, one of 'PassportElementType'.     , passportElementErrorName        :: Text                -- ^ Name of the data field which has the error.     , passportElementErrorHash        :: Maybe Text          -- ^ Base64-encoded data hash.
src/Telegram/Bot/API/Types/PollAnswer.hs view
@@ -4,6 +4,7 @@ import Data.Aeson (FromJSON (..), ToJSON (..)) import GHC.Generics (Generic) +import Telegram.Bot.API.Types.Chat import Telegram.Bot.API.Types.Common import Telegram.Bot.API.Types.User import Telegram.Bot.API.Internal.Utils@@ -13,7 +14,8 @@ -- | This object represents an answer of a user in a non-anonymous poll. data PollAnswer = PollAnswer   { pollAnswerPollId    :: PollId -- ^ Unique poll identifier.-  , pollAnswerUser      :: User   -- ^ The user, who changed the answer to the poll.+  , pollAnswerVoterChat :: Maybe Chat -- ^ The chat that changed the answer to the poll, if the voter is anonymous.+  , pollAnswerUser      :: Maybe User   -- ^ The user that changed the answer to the poll, if the voter isn't anonymous. For backward compatibility, the field user in such objects will contain the user @136817688@ (\@Channel_Bot).   , pollAnswerOptionIds :: [Int]  -- ^ 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.   }   deriving (Generic, Show)
+ src/Telegram/Bot/API/Types/ReactionCount.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ReactionCount where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.ReactionType+import Telegram.Bot.API.Internal.Utils++-- ** 'ReactionCount'++-- | Represents a reaction added to a message along with the number of times it was added.+data ReactionCount = ReactionCount+      { reactionCountType :: ReactionType -- ^ Type of the reaction.+      , reactionCountTotalCount :: Int -- ^ Number of times the reaction was added.+      }+  deriving (Generic, Show)++instance ToJSON   ReactionCount where toJSON = gtoJSON+instance FromJSON ReactionCount where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/ReactionType.hs view
@@ -0,0 +1,51 @@+{-# LANGUAGE BlockArguments #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+module Telegram.Bot.API.Types.ReactionType where++import Data.Aeson (FromJSON (..), ToJSON (..), KeyValue ((.=)), Value (..), withObject, (.:))+import Data.Aeson.Types (Parser)+import Data.Text (Text)++import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Internal.Utils++import qualified Data.Text as Text++-- ** 'ReactionType'++-- | This object describes the type of a reaction. Currently, it can be one of+-- +-- * 'ReactionTypeEmoji',+-- * 'ReactionTypeCustomEmoji'.+--+data ReactionType+  -- ^ The reaction is based on an emoji.+  = ReactionTypeEmoji+      { reactionTypeEmojiType  :: Text -- ^ Type of the reaction, always “emoji”.+      , reactionTypeEmojiEmoji :: Text -- ^ Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡".+      }+  -- ^ The reaction is based on a custom emoji.+  | ReactionTypeCustomEmoji+      { reactionTypeCustomEmojiType :: Text -- ^ Type of the reaction, always “custom_emoji”.+      , reactionTypeCustomEmojiCustomEmojiId :: Text -- ^ Custom emoji identifier.+      }+  deriving Show++instance ToJSON ReactionType where+  toJSON = \case+    ReactionTypeEmoji _t e -> addJsonFields (Object mempty) (addType "emoji" ["emoji" .= e])+    ReactionTypeCustomEmoji _t cei ->+      addJsonFields (Object mempty) (addType "custom_emoji" ["custom_emoji_id" .= cei])++instance FromJSON ReactionType where+  parseJSON = withObject "ReactionType" \o ->+    (o .: "type" :: Parser Text) >>= \case+    "emoji" -> ReactionTypeEmoji+      <$> o .: "type"+      <*> o .: "emoji"+    "custom_emoji" -> ReactionTypeCustomEmoji+      <$> o .: "type"+      <*> o .: "custom_emoji_id"+    t -> fail $ Text.unpack ("Unknown type: " <> t)
+ src/Telegram/Bot/API/Types/ReplyParameters.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.ReplyParameters where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Text (Text)+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Types.MessageEntity+import Telegram.Bot.API.Types.ParseMode+import Telegram.Bot.API.Internal.Utils++-- ** 'ReplyParameters'++-- | Describes reply parameters for the message that is being sent.+data ReplyParameters = ReplyParameters+  { replyParametersMessageId :: MessageId -- ^ Identifier of the message that will be replied to in the current chat, or in the chat @chat_id@ if it is specified.+  , replyParametersChatId :: Maybe SomeChatId -- ^ f the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format \@channelusername).+  , replyParametersAllowSendingWithoutReply :: Maybe Bool -- ^ Pass 'True' if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.+  , replyParametersQuote :: Maybe Text -- ^ Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including @bold@, @italic@, @underline@, @strikethrough@, @spoiler@, and @custom_emoji@ entities. The message will fail to send if the quote isn't found in the original message.+  , replyParametersQuoteParseMode :: Maybe ParseMode -- ^ Mode for parsing entities in the quote. See formatting options for more details.+  , replyParametersQuoteEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the quote. It can be specified instead of @quote_parse_mode@.+  , replyParametersQuotePosition :: Maybe Int -- ^ Position of the quote in the original message in UTF-16 code units.+  } deriving (Generic, Show)++instance ToJSON   ReplyParameters where toJSON = gtoJSON+instance FromJSON ReplyParameters where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/Story.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.Story where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils++-- ** 'Story'++-- | This object represents a message about a forwarded story in the chat. Currently holds no information.++data Story = Story+  deriving (Generic, Show)++instance ToJSON Story where toJSON = gtoJSON+instance FromJSON Story where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/TextQuote.hs view
@@ -0,0 +1,22 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.TextQuote where++import Data.Aeson (FromJSON (..), ToJSON (..))+import Data.Text (Text)+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.MessageEntity+import Telegram.Bot.API.Internal.Utils++-- ** 'TextQuote'++-- | This object contains information about the quoted part of a message that is replied to by the given message.+data TextQuote = TextQuote+  { textQuoteText :: Text -- ^ Text of the quoted part of a message that is replied to by the given message.+  , textQuoteEntities :: Maybe [MessageEntity] -- ^ Special entities that appear in the quote. Currently, only @bold@, @italic@, @underline@, @strikethrough@, @spoiler@, and @custom_emoji@ entities are kept in quotes.+  , textQuotePosition :: Int -- ^ Approximate quote position in the original message in UTF-16 code units as specified by the sender.+  , textQuoteIsManual :: Maybe Bool -- ^ 'True', if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.+  } deriving (Show, Generic)++instance ToJSON   TextQuote where toJSON = gtoJSON+instance FromJSON TextQuote where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/UserChatBoosts.hs view
@@ -0,0 +1,19 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.UserChatBoosts where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Internal.Utils+import Telegram.Bot.API.Types.ChatBoost++-- ** 'UserChatBoosts'++-- | This object represents a list of boosts added to a chat by a user.+newtype UserChatBoosts = UserChatBoosts+  { userChatBoostsBosts :: [ChatBoost]+  }+  deriving (Generic, Show)++instance ToJSON   UserChatBoosts where toJSON = gtoJSON+instance FromJSON UserChatBoosts where parseJSON = gparseJSON
+ src/Telegram/Bot/API/Types/UsersShared.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE DeriveGeneric #-}+module Telegram.Bot.API.Types.UsersShared where++import Data.Aeson (FromJSON (..), ToJSON (..))+import GHC.Generics (Generic)++import Telegram.Bot.API.Types.Common+import Telegram.Bot.API.Internal.Utils++-- ** 'UsersShared'++-- | This object contains information about the users whose identifiers were shared with the bot using a 'KeyboardButtonRequestUsers' button.+data UsersShared = UsersShared+  { usersSharedRequestId :: RequestId -- ^ Identifier of the request.+  , usersSharedUserId :: [UserId] -- ^ Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.+  }+  deriving (Generic, Show)++instance ToJSON   UsersShared where toJSON = gtoJSON+instance FromJSON UsersShared where parseJSON = gparseJSON
src/Telegram/Bot/API/Types/WriteAccessAllowed.hs view
@@ -10,8 +10,10 @@ -- ** 'WriteAccessAllowed'  -- | This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.-newtype WriteAccessAllowed = WriteAccessAllowed-  { writeAccessAllowedWebAppName :: Maybe Text -- ^ Name of the Web App which was launched from a link.+data WriteAccessAllowed = WriteAccessAllowed+  { writeAccessAllowedFromRequest :: Maybe Bool -- ^ True, if the access was granted after the user accepted an explicit request from a Web App sent by the method 'requestWriteAccess'.+  , writeAccessAllowedWebAppName :: Maybe Text -- ^ Name of the Web App which was launched from a link.+  , writeAccessAllowedFromAttachmentMenu :: Maybe Bool -- ^ 'True', if the access was granted when the bot was added to the attachment or side menu.   }   deriving (Generic, Show) 
src/Telegram/Bot/API/UpdatingMessages.hs view
@@ -38,7 +38,7 @@   , editMessageTextText                  :: Text -- ^ Text of the message to be sent.   , editMessageTextParseMode             :: Maybe ParseMode -- ^ Send 'MarkdownV2', 'HTML' or 'Markdown' (legacy), if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.   , editMessageEntities                  :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in message text, which can be specified instead of /parse_mode/.-  , editMessageTextDisableWebPagePreview :: Maybe Bool -- ^ Disables link previews for links in this message.+  , editMessageTextLinkPreviewOptions    :: Maybe LinkPreviewOptions -- ^ Link preview generation options for the message.   , editMessageTextReplyMarkup           :: Maybe SomeReplyMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. } deriving (Generic) 
telegram-bot-api.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           telegram-bot-api-version:        6.7.1+version:        7.0 synopsis:       Easy to use library for building Telegram bots. Exports Telegram Bot API. description:    Please see the README on Github at <https://github.com/fizruk/telegram-bot-simple#readme>                 .@@ -43,17 +43,20 @@       Telegram.Bot.API.Methods.BanChatMember       Telegram.Bot.API.Methods.BanChatSenderChat       Telegram.Bot.API.Methods.CopyMessage+      Telegram.Bot.API.Methods.CopyMessages       Telegram.Bot.API.Methods.CreateChatInviteLink       Telegram.Bot.API.Methods.DeclineChatJoinRequest       Telegram.Bot.API.Methods.DeleteChatPhoto       Telegram.Bot.API.Methods.DeleteChatStickerSet       Telegram.Bot.API.Methods.DeleteMessage+      Telegram.Bot.API.Methods.DeleteMessages       Telegram.Bot.API.Methods.DeleteMyCommands       Telegram.Bot.API.Methods.DeleteStickerSet       Telegram.Bot.API.Methods.EditChatInviteLink       Telegram.Bot.API.Methods.EditMessageLiveLocation       Telegram.Bot.API.Methods.ExportChatInviteLink       Telegram.Bot.API.Methods.ForwardMessage+      Telegram.Bot.API.Methods.ForwardMessages       Telegram.Bot.API.Methods.GetChat       Telegram.Bot.API.Methods.GetChatAdministrators       Telegram.Bot.API.Methods.GetChatMember@@ -66,6 +69,7 @@       Telegram.Bot.API.Methods.GetMyDescription       Telegram.Bot.API.Methods.GetMyName       Telegram.Bot.API.Methods.GetMyShortDescription+      Telegram.Bot.API.Methods.GetUserChatBoosts       Telegram.Bot.API.Methods.GetUserProfilePhotos       Telegram.Bot.API.Methods.LeaveChat       Telegram.Bot.API.Methods.PinChatMessage@@ -94,6 +98,7 @@       Telegram.Bot.API.Methods.SetChatPhoto       Telegram.Bot.API.Methods.SetChatStickerSet       Telegram.Bot.API.Methods.SetChatTitle+      Telegram.Bot.API.Methods.SetMessageReaction       Telegram.Bot.API.Methods.SetMyCommands       Telegram.Bot.API.Methods.SetCustomEmojiStickerSetThumbnail       Telegram.Bot.API.Methods.SetMyDefaultAdministratorRights@@ -125,6 +130,10 @@       Telegram.Bot.API.Types.CallbackGame       Telegram.Bot.API.Types.CallbackQuery       Telegram.Bot.API.Types.Chat+      Telegram.Bot.API.Types.ChatBoost+      Telegram.Bot.API.Types.ChatBoostRemoved+      Telegram.Bot.API.Types.ChatBoostSource+      Telegram.Bot.API.Types.ChatBoostUpdated       Telegram.Bot.API.Types.ChatAdministratorRights       Telegram.Bot.API.Types.ChatInviteLink       Telegram.Bot.API.Types.ChatJoinRequest@@ -141,6 +150,7 @@       Telegram.Bot.API.Types.Document       Telegram.Bot.API.Types.EncryptedCredentials       Telegram.Bot.API.Types.EncryptedPassportElement+      Telegram.Bot.API.Types.ExternalReplyInfo       Telegram.Bot.API.Types.File       Telegram.Bot.API.Types.ForceReply       Telegram.Bot.API.Types.ForumTopic@@ -150,6 +160,10 @@       Telegram.Bot.API.Types.ForumTopicReopened       Telegram.Bot.API.Types.Game       Telegram.Bot.API.Types.GameHighScore+      Telegram.Bot.API.Types.Giveaway+      Telegram.Bot.API.Types.GiveawayCompleted+      Telegram.Bot.API.Types.GiveawayCreated+      Telegram.Bot.API.Types.GiveawayWinners       Telegram.Bot.API.Types.GeneralForumTopicHidden       Telegram.Bot.API.Types.GeneralForumTopicUnhidden       Telegram.Bot.API.Types.InlineKeyboardButton@@ -158,8 +172,9 @@       Telegram.Bot.API.Types.Invoice       Telegram.Bot.API.Types.KeyboardButton       Telegram.Bot.API.Types.KeyboardButtonRequestChat-      Telegram.Bot.API.Types.KeyboardButtonRequestUser+      Telegram.Bot.API.Types.KeyboardButtonRequestUsers       Telegram.Bot.API.Types.LabeledPrice+      Telegram.Bot.API.Types.LinkPreviewOptions       Telegram.Bot.API.Types.Location       Telegram.Bot.API.Types.LoginUrl       Telegram.Bot.API.Types.MaskPosition@@ -167,6 +182,9 @@       Telegram.Bot.API.Types.Message       Telegram.Bot.API.Types.MessageAutoDeleteTimerChanged       Telegram.Bot.API.Types.MessageEntity+      Telegram.Bot.API.Types.MessageOrigin+      Telegram.Bot.API.Types.MessageReactionCountUpdated+      Telegram.Bot.API.Types.MessageReactionUpdated       Telegram.Bot.API.Types.OrderInfo       Telegram.Bot.API.Types.ParseMode       Telegram.Bot.API.Types.PassportData@@ -179,19 +197,26 @@       Telegram.Bot.API.Types.PollType       Telegram.Bot.API.Types.PreCheckoutQuery       Telegram.Bot.API.Types.ProximityAlertTriggered+      Telegram.Bot.API.Types.ReactionCount+      Telegram.Bot.API.Types.ReactionType       Telegram.Bot.API.Types.ReplyKeyboardMarkup       Telegram.Bot.API.Types.ReplyKeyboardRemove+      Telegram.Bot.API.Types.ReplyParameters       Telegram.Bot.API.Types.ResponseParameters       Telegram.Bot.API.Types.ShippingAddress       Telegram.Bot.API.Types.ShippingOption       Telegram.Bot.API.Types.ShippingQuery       Telegram.Bot.API.Types.SomeReplyMarkup       Telegram.Bot.API.Types.Sticker+      Telegram.Bot.API.Types.Story       Telegram.Bot.API.Types.SuccessfulPayment       Telegram.Bot.API.Types.SwitchInlineQueryChosenChat+      Telegram.Bot.API.Types.TextQuote       Telegram.Bot.API.Types.User+      Telegram.Bot.API.Types.UserChatBoosts       Telegram.Bot.API.Types.UserProfilePhotos       Telegram.Bot.API.Types.UserShared+      Telegram.Bot.API.Types.UsersShared       Telegram.Bot.API.Types.Venue       Telegram.Bot.API.Types.Video       Telegram.Bot.API.Types.VideoChatEnded