Skip to content

Commit

Permalink
Telegram Bot API October 31, 2024 updates (v7.11)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnspade committed Nov 1, 2024
1 parent 8f11ec3 commit 7682343
Show file tree
Hide file tree
Showing 30 changed files with 266 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# F[Tg] - Telegramium

[![Telegram](https://img.shields.io/badge/Telegram%20Bot%20API-7.10%20(September%206%2C%202024)-blue)](https://core.telegram.org/bots/api#recent-changes)
[![Telegram](https://img.shields.io/badge/Telegram%20Bot%20API-7.11%20(October%2031%2C%202024)-blue)](https://core.telegram.org/bots/api#recent-changes)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.apimorphism/telegramium-core_3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.apimorphism/telegramium-core_3)


Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
enablePlugins(GitPlugin)

ThisBuild / version := Version.mkVersion(
"9.710.0",
"9.711.0",
git.gitCurrentBranch.value,
git.gitDescribedVersion.value,
git.gitUncommittedChanges.value
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package telegramium.bots

/** This object represents an inline keyboard button that copies specified text to the clipboard.
*
* @param text
* The text to be copied to the clipboard; 1-256 characters
*/
final case class CopyTextButton(text: String)
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ package telegramium.bots
* Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type,
* open that chat and insert the bot's username and the specified inline query in the input field. Not supported for
* messages sent on behalf of a Telegram Business account.
* @param copyText
* Optional. Description of the button that copies the specified text to the clipboard.
* @param callbackGame
* Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of
* button must always be the first button in the first row.
Expand All @@ -48,6 +50,7 @@ final case class InlineKeyboardButton(
switchInlineQuery: Option[String] = Option.empty,
switchInlineQueryCurrentChat: Option[String] = Option.empty,
switchInlineQueryChosenChat: Option[SwitchInlineQueryChosenChat] = Option.empty,
copyText: Option[CopyTextButton] = Option.empty,
callbackGame: Option[CallbackGame.type] = Option.empty,
pay: Option[Boolean] = Option.empty
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ sealed trait MaybeInaccessibleMessage {}
/** This object represents a message.
*
* @param messageId
* Unique message identifier inside this chat
* Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big
* chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this
* field will be 0 and the relevant message will be unusable until it is actually sent
* @param date
* Date the message was sent in Unix time. It is always a positive number, representing a valid date.
* @param chat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package telegramium.bots
/** This object represents a unique message identifier.
*
* @param messageId
* Unique message identifier
* Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server
* might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and
* the relevant message will be unusable until it is actually sent
*/
final case class MessageId(messageId: Int)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package telegramium.bots
/** Describes a Telegram Star transaction.
*
* @param id
* Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund
* Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund
* transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from
* users.
* @param amount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ final case class TransactionPartnerUser(
paidMediaPayload: Option[String] = Option.empty
) extends TransactionPartner

/** Describes a transaction with payment for paid broadcasting.
*
* @param requestCount
* The number of successful requests that exceeded regular limits and were therefore billed
*/
final case class TransactionPartnerTelegramApi(requestCount: Int) extends TransactionPartner

/** Describes a withdrawal transaction with Fragment.
*
* @param withdrawalState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ import telegramium.bots.KeyboardMarkup
* Sends the message silently. Users will receive a notification with no sound.
* @param protectContent
* Protects the contents of the sent message from forwarding and saving
* @param allowPaidBroadcast
* Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars
* per message. The relevant Stars will be withdrawn from the bot's balance
* @param replyParameters
* Description of the message to reply to
* @param replyMarkup
Expand All @@ -45,6 +48,7 @@ final case class CopyMessageReq(
showCaptionAboveMedia: Option[Boolean] = Option.empty,
disableNotification: Option[Boolean] = Option.empty,
protectContent: Option[Boolean] = Option.empty,
allowPaidBroadcast: Option[Boolean] = Option.empty,
replyParameters: Option[ReplyParameters] = Option.empty,
replyMarkup: Option[KeyboardMarkup] = Option.empty
)
Loading

0 comments on commit 7682343

Please sign in to comment.