packages feed

telegram-bot-api 7.3.1 → 7.4

raw patch · 26 files changed

+104/−23 lines, 26 files

Files

CHANGELOG.md view
@@ -1,5 +1,36 @@ # telegram-bot-api +## 7.4 -- 2024-06-02++- Types:+  - `InlineQueryResult` type extended with `show_caption_above_media` field.+  - `provider_token` field documentation was updated for `InputMessageContent` type.+  - `InputMediaGeneric` type extended with `show_caption_above_media` field.+  - `Message` type extended with `effect_id`, `show_caption_above_media` fields.+  - `MessageEntity` type extended with `MessageEntityExpandableBlockquote` constructor.+- Methods:+  - `sendGame` method request extended with `message_effect_id` field.+  - `copyMessage` method request extended with `show_caption_above_media` field.+  - `editMessageCaption` method request extended with `show_caption_above_media` field.+  - `sendAnimation` method request extended with `message_effect_id`, `show_caption_above_media` fields.+  - `sendAudio` method request extended with `message_effect_id` field.+  - `sendContact` method request extended with `message_effect_id` field.+  - `sendDice` method request extended with `message_effect_id` field.+  - `sendDocument` method request extended with `message_effect_id` field.+  - `sendLocation` method request extended with `message_effect_id` field.+  - `sendMediaGroup` method request extended with `message_effect_id` field.+  - `sendMessage` method request extended with `message_effect_id` field.+  - `sendPhoto` method request extended with `message_effect_id`, `show_caption_above_media` fields.+  - `sendPoll` method request extended with `message_effect_id` field.+  - `sendPoll` method request extended with `message_effect_id` field.+  - `sendSticker` method request extended with `message_effect_id` field.+  - `sendVideo` method request extended with `message_effect_id`, `show_caption_above_media` fields.+  - `sendVideoNote` method request extended with `message_effect_id` field.+  - `sendVoice` method request extended with `message_effect_id`, `show_caption_above_media` fields.+  - `provider_token` field documentation was updated for `createInvoiceLink` method.+  - `provider_token` field documentation was updated for `sendInvoice` method.+  - `refundStarPayment` method added.+ ## 7.3.1 -- 2024-05-26  - Fix parsers for `InlineQueryResult`, `BackgroundType`, `ChatBoostSource`, `MessageOrigin`.
src/Telegram/Bot/API/Games.hs view
@@ -33,6 +33,7 @@   , sendGameGameShortName            :: Text                       -- ^ Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.   , 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.+  , sendGameMessageEffectId          :: Maybe Text                 -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendGameReplyToMessageId         :: Maybe MessageId            -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/InlineMode/InlineQueryResult.hs view
@@ -31,6 +31,7 @@   , inlineQueryResultCaption :: Maybe Text -- ^ Caption of the media to be sent, 0-1024 characters after entities parsing.   , inlineQueryResultParseMode :: Maybe Text -- ^ Mode for parsing entities in the photo caption. See formatting options <https:\/\/core.telegram.org\/bots\/api#formatting-options> for more details.   , inlineQueryResultCaptionEntities :: Maybe [MessageEntity] -- ^ List of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , inlineQueryResultShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , inlineQueryResultReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Inline keyboard attached to the message.   , inlineQueryResultInputMessageContent :: Maybe InputMessageContent -- ^  Content of the message to be sent instead of the media.   , inlineQueryResultDescription :: Maybe Text -- ^ Short description of the result.
src/Telegram/Bot/API/InlineMode/InputMessageContent.hs view
@@ -43,7 +43,7 @@     { inputMessageContentTitle :: Text -- ^ Product name, 1-32 characters.     , inputMessageContentDescription :: Text -- ^ Product description, 1-255 characters.     , inputMessageContentPayload :: Text -- ^ Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.-    , inputMessageContentProviderToken :: Text -- ^ Payment provider token, obtained via [@BotFather](https://t.me/botfather).+    , inputMessageContentProviderToken :: Text -- ^ Payment provider token, obtained via [@BotFather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90).     , inputMessageContentCurrency :: Text -- ^ Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.org/bots/payments#supported-currencies).     , inputMessageContentPrices :: [LabeledPrice] -- ^ Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.).     , inputMessageContentMaxTipAmount :: Maybe Integer -- ^ The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of @US$ 1.45@ pass @max_tip_amount = 145@. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0.
src/Telegram/Bot/API/Methods/CopyMessage.hs view
@@ -41,7 +41,8 @@   , copyMessageMessageId :: MessageId -- ^ Message identifier in the chat specified in from_chat_id   , copyMessageCaption :: Maybe Text -- ^ New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept   , copyMessageParseMode :: 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.-  , copyMessageCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode+  , copyMessageCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , copyMessageShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , 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
src/Telegram/Bot/API/Methods/SendAnimation.hs view
@@ -47,10 +47,12 @@   , sendAnimationThumbnail :: Maybe InputFile -- ^ Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »   , sendAnimationCaption :: Maybe Text -- ^ Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing   , sendAnimationParseMode :: 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.-  , sendAnimationCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode+  , sendAnimationCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , sendAnimationShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , sendAnimationHasSpoiler :: Maybe Bool -- ^ Pass 'True' if the animation needs to be covered with a spoiler animation.   , 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.+  , sendAnimationMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendAnimationReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/Methods/SendAudio.hs view
@@ -50,6 +50,7 @@   , sendAudioCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode   , 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+  , sendAudioMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendAudioReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message   , 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.
src/Telegram/Bot/API/Methods/SendContact.hs view
@@ -28,8 +28,9 @@   , sendContactLastName  :: Text -- ^ Contact's last name   , sendContactVcard  :: Text -- ^ Additional data about the contact in the form of a vCard, 0-2048 bytes   , 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+  , sendContactProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  , sendContactMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendContactReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Methods/SendDice.hs view
@@ -25,8 +25,9 @@   , sendDiceMessageThreadId :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.   , sendDiceEmoji :: Maybe Text -- ^ Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”   , 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+  , sendDiceProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding.+  , sendDiceMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendDiceReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Methods/SendDocument.hs view
@@ -70,6 +70,7 @@   , sendDocumentDisableContentTypeDetection :: Maybe Bool -- ^ Disables automatic server-side content type detection for files uploaded using @multipart/form-data@.   , 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.+  , sendDocumentMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendDocumentReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/Methods/SendLocation.hs view
@@ -6,6 +6,7 @@  import Data.Aeson (FromJSON (..), ToJSON (..)) import Data.Proxy+import Data.Text (Text) import GHC.Generics (Generic) import Servant.API import Servant.Client hiding (Response)@@ -29,8 +30,9 @@   , sendLocationHeading :: Maybe Int -- ^ Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.   , sendLocationProximityAlertRadius :: Maybe Int  -- ^ Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.   , 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+  , sendLocationProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  , sendLocationMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendLocationReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Methods/SendMediaGroup.hs view
@@ -6,6 +6,7 @@  import Data.Aeson (ToJSON (..)) import Data.Proxy+import Data.Text (Text) import GHC.Generics (Generic) import Servant.API import Servant.Client hiding (Response)@@ -24,8 +25,9 @@   , sendMediaGroupMessageThreadId :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.   , sendMediaGroupMedia :: [InputMedia] -- ^ A JSON-serialized array describing messages to be sent, must include 2-10 items. InputMediaAudio, InputMediaDocument, InputMediaPhoto or InputMediaVideo.   , 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+  , sendMediaGroupProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  , sendMediaGroupMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendMediaGroupReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Methods/SendMessage.hs view
@@ -39,6 +39,7 @@   , 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.+  , sendMessageMessageEffectId       :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendMessageReplyToMessageId      :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/Methods/SendPhoto.hs view
@@ -69,9 +69,11 @@   , sendPhotoCaption :: Maybe Text -- ^ Photo caption (may also be used when resending Photos by file_id), 0-1024 characters after entities parsing   , sendPhotoParseMode :: 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.   , sendPhotoCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of /parse_mode/.+  , sendPhotoShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , sendPhotoHasSpoiler :: Maybe Bool -- ^ Pass 'True' if the photo needs to be covered with a spoiler animation.   , 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.+  , sendPhotoMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendPhotoReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/Methods/SendPoll.hs view
@@ -40,6 +40,7 @@   , sendPollIsClosed :: Maybe Bool -- ^ Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.   , 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.+  , sendPollMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendPollReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.
src/Telegram/Bot/API/Methods/SendVenue.hs view
@@ -32,8 +32,9 @@   , sendVenueGooglePlaceId :: Maybe Text -- ^ Google Places identifier of the venue   , sendVenueGooglePlaceType :: Maybe Text -- ^ Google Places type of the venue. (See supported types <https:\/\/developers.google.com\/maps\/documentation\/places\/web-service\/supported_types>.)   , 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+  , sendVenueProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  , sendVenueMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendVenueReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Methods/SendVideo.hs view
@@ -47,11 +47,13 @@   , sendVideoThumbnail :: Maybe InputFile -- ^ Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »   , sendVideoCaption :: Maybe Text -- ^ Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing   , sendVideoParseMode :: 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.-  , sendVideoCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode+  , sendVideoCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , sendVideoShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , sendVideoHasSpoiler :: Maybe Bool -- ^ Pass 'True' if the video needs to be covered with a spoiler animation.   , sendVideoSupportsStreaming :: Maybe Bool -- ^ Pass True, if the uploaded video is suitable for streaming   , 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.+  , sendVideoMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendVideoReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message   , 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.
src/Telegram/Bot/API/Methods/SendVideoNote.hs view
@@ -17,6 +17,7 @@ import Data.Maybe (catMaybes) import Data.Functor ((<&>)) import Data.Proxy+import Data.Text (Text) import GHC.Generics (Generic) import Servant.API import Servant.Multipart.API@@ -44,6 +45,7 @@   , sendVideoNoteThumbnail :: Maybe InputFile -- ^ Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »   , 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+  , sendVideoNoteMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendVideoNoteReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message   , 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.
src/Telegram/Bot/API/Methods/SendVoice.hs view
@@ -41,13 +41,14 @@   , sendVoiceChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format @channelusername).   , sendVoiceMessageThreadId :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.   , sendVoiceVoice :: InputFile -- ^ Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files »-  , sendVoiceCaption :: Maybe Text -- ^ Voice message caption, 0-1024 characters after entities parsing+  , sendVoiceCaption :: Maybe Text -- ^ Voice message caption, 0-1024 characters after entities parsing/   , sendVoiceParseMode :: 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.-  , sendVoiceCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode-  , sendVoiceDuration :: Maybe Int -- ^ Duration of the voice message in seconds+  , sendVoiceCaptionEntities :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , sendVoiceDuration :: Maybe Int -- ^ Duration of the voice message in seconds.   , 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+  , sendVoiceProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.+  , sendVoiceMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.+  , sendVoiceReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.   , 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.   }
src/Telegram/Bot/API/Payments.hs view
@@ -26,7 +26,7 @@   , sendInvoiceTitle                     :: Text                       -- ^ Product name, 1-32 characters.   , sendInvoiceDescription               :: Text                       -- ^ Product description, 1-255 characters.   , sendInvoicePayload                   :: Text                       -- ^ Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.-  , sendInvoiceProviderToken             :: Text                       -- ^ Payments provider token, obtained via Botfather.+  , sendInvoiceProviderToken             :: Text                       -- ^ Payments provider token, obtained via [\@Botfather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90).   , sendInvoiceCurrency                  :: Text                       -- ^ Three-letter ISO 4217 currency code, see more on currencies.   , sendInvoicePrices                    :: [LabeledPrice]             -- ^ Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.).   , sendInvoiceMaxTipAmount              :: Maybe Integer              -- ^ The maximum accepted amount for tips in the smallest units of the currency (integer, not float\/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0.@@ -46,6 +46,7 @@   , sendInvoiceIsFlexible                :: Maybe Bool                 -- ^ Pass 'True', if the final price depends on the shipping method.   , 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.+  , sendInvoiceMessageEffectId           :: Maybe Text                 -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendInvoiceReplyToMessageId          :: Maybe MessageId            -- ^ If the message is a reply, ID of the original message.   , 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.@@ -70,7 +71,7 @@   { createInvoiceLinkTitle                     :: Text            -- ^ Product name, 1-32 characters.   , createInvoiceLinkDescription               :: Text            -- ^ Product description, 1-255 characters.   , createInvoiceLinkPayload                   :: Text            -- ^ Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.-  , createInvoiceLinkProviderToken             :: Text            -- ^ Payment provider token, obtained via BotFather.+  , createInvoiceLinkProviderToken             :: Text            -- ^ Payments provider token, obtained via [\@Botfather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90).   , createInvoiceLinkCurrency                  :: Text            -- ^ Three-letter ISO 4217 currency code, see more on currencies.   , createInvoiceLinkPrices                    :: [LabeledPrice]  -- ^ Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.).   , createInvoiceLinkMaxTipAmount              :: Maybe Integer   -- ^ The maximum accepted amount for tips in the smallest units of the currency (integer, not float\/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0.@@ -144,6 +145,26 @@ -- | Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, 'True' is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. answerPreCheckoutQuery :: AnswerPreCheckoutQueryRequest -> ClientM (Response Bool) answerPreCheckoutQuery = client (Proxy @AnswerPreCheckoutQuery)++-- ** 'refundStarPayment'++data RefundStarPaymentRequest = RefundStarPaymentRequest+  { refundStarPaymentUserId :: UserId -- ^ Identifier of the user whose payment will be refunded.+  , refundStarPaymentTelegramPaymentChargeId :: Text -- ^ Telegram payment identifier.+  }+  deriving (Generic, Show)++instance ToJSON RefundStarPaymentRequest where toJSON = gtoJSON+instance FromJSON RefundStarPaymentRequest where parseJSON = gparseJSON++type RefundStarPayment+  =  "refundStarPayment"+  :> ReqBody '[JSON] RefundStarPaymentRequest+  :> Post '[JSON] (Response Bool)++-- | Refunds a successful payment in [Telegram Stars](https://t.me/BotNews/90). Returns 'True' on success.+refundStarPayment :: RefundStarPaymentRequest -> ClientM (Response Bool)+refundStarPayment = client (Proxy @RefundStarPayment)  foldMap makeDefault   [ ''SendInvoiceRequest
src/Telegram/Bot/API/Stickers.hs view
@@ -52,6 +52,7 @@   , sendStickerSticker                  :: InputFile -- ^ Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a __.WEBP__ sticker from the Internet, or upload a new __.WEBP__, __.TGS__, or __.WEBM__ sticker using multipart\/form-data. More information on Sending Files ». Video and animated stickers can't be sent via an HTTP URL.   , 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.+  , sendStickerMessageEffectId          :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.   , sendStickerReplyToMessageId         :: Maybe MessageId -- ^	If the message is a reply, ID of the original message   , 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.
src/Telegram/Bot/API/Types/InputMedia.hs view
@@ -29,6 +29,7 @@   , inputMediaGenericCaption :: Maybe Text -- ^ Caption of the photo to be sent, 0-1024 characters after entities parsing.   , inputMediaGenericParseMode :: Maybe Text -- ^ Mode for parsing entities in the photo caption. See formatting options <https:\/\/core.telegram.org\/bots\/api#formatting-options> for more details.   , inputMediaGenericCaptionEntities :: Maybe [MessageEntity] -- ^ List of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , inputMediaGenericShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   }   deriving Generic 
src/Telegram/Bot/API/Types/Message.hs view
@@ -85,6 +85,7 @@   , 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.+  , messageEffectId              :: Maybe Text -- ^ Unique identifier of the message effect added to the message.   , 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.@@ -96,6 +97,7 @@   , messageVoice                 :: Maybe Voice -- ^ Message is a voice message, information about the file   , messageCaption               :: Maybe Text -- ^ Caption for the audio, document, photo, video or voice, 0-200 characters   , messageCaptionEntities       :: Maybe [MessageEntity] -- ^ For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption.+  , messageShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , messageHasMediaSpoiler       :: Maybe Bool -- ^ 'True', if the message media is covered by a spoiler animation.   , messageContact               :: Maybe Contact -- ^ Message is a shared contact, information about the contact   , messageDice                  :: Maybe Dice -- ^ Message is a dice with random value.
src/Telegram/Bot/API/Types/MessageEntity.hs view
@@ -39,6 +39,7 @@   | MessageEntityStrikethrough -- ^ See <https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity_type_strikethrough.html>   | MessageEntitySpoiler   | MessageEntityBlockquote+  | MessageEntityExpandableBlockquote -- ^ See <https://core.telegram.org/bots/api#may-28-2024>   | MessageEntityCode   | MessageEntityPre   | MessageEntityTextLink
src/Telegram/Bot/API/UpdatingMessages.hs view
@@ -49,7 +49,8 @@   , editMessageCaptionInlineMessageId  :: Maybe MessageId -- ^ Required if 'editMessageCaptionChatId' and 'editMessageCaptionMessageId' are not specified. Identifier of the sent message.   , editMessageCaptionCaption          :: Maybe Text -- ^ New caption of the message, 0-1024 characters after entities parsing   , editMessageCaptionParseMode        :: Maybe ParseMode -- ^ Mode for parsing entities in the message caption. See formatting options for more details.-  , editMessageCaptionCaptionEntities  :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode+  , editMessageCaptionCaptionEntities  :: Maybe [MessageEntity] -- ^ A JSON-serialized list of special entities that appear in the caption, which can be specified instead of @parse_mode@.+  , editMessageCaptionShowCaptionAboveMedia :: Maybe Bool -- ^ Pass 'True', if the caption must be shown above the message media.   , editMessageCaptionReplyMarkup      :: 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:        7.3.1+version:        7.4 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>                 .