-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Telegram Bot API November 17, 2024 updates (v8.0)
- Loading branch information
Showing
17 changed files
with
428 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
telegramium-core/src/main/scala/telegramium/bots/Gift.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package telegramium.bots | ||
|
||
/** This object represents a gift that can be sent by the bot. | ||
* | ||
* @param id | ||
* Unique identifier of the gift | ||
* @param sticker | ||
* The sticker that represents the gift | ||
* @param starCount | ||
* The number of Telegram Stars that must be paid to send the sticker | ||
* @param totalCount | ||
* Optional. The total number of the gifts of this type that can be sent; for limited gifts only | ||
* @param remainingCount | ||
* Optional. The number of remaining gifts of this type that can be sent; for limited gifts only | ||
*/ | ||
final case class Gift( | ||
id: String, | ||
sticker: Sticker, | ||
starCount: Int, | ||
totalCount: Option[Int] = Option.empty, | ||
remainingCount: Option[Int] = Option.empty | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package telegramium.bots | ||
|
||
/** This object represent a list of gifts. | ||
* | ||
* @param gifts | ||
* The list of gifts | ||
*/ | ||
final case class Gifts(gifts: List[Gift] = List.empty) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
telegramium-core/src/main/scala/telegramium/bots/PreparedInlineMessage.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package telegramium.bots | ||
|
||
/** Describes an inline message to be sent by a user of a Mini App. | ||
* | ||
* @param id | ||
* Unique identifier of the prepared message | ||
* @param expirationDate | ||
* Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used | ||
*/ | ||
final case class PreparedInlineMessage(id: String, expirationDate: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
telegramium-core/src/main/scala/telegramium/bots/client/EditUserStarSubscriptionReq.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package telegramium.bots.client | ||
|
||
/** @param userId | ||
* Identifier of the user whose subscription will be edited | ||
* @param telegramPaymentChargeId | ||
* Telegram payment identifier for the subscription | ||
* @param isCanceled | ||
* Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the | ||
* current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled | ||
* by the bot. | ||
*/ | ||
final case class EditUserStarSubscriptionReq(userId: Long, telegramPaymentChargeId: String, isCanceled: Boolean) |
3 changes: 3 additions & 0 deletions
3
telegramium-core/src/main/scala/telegramium/bots/client/GetAvailableGiftsReq.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package telegramium.bots.client | ||
|
||
case object GetAvailableGiftsReq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
telegramium-core/src/main/scala/telegramium/bots/client/SavePreparedInlineMessageReq.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package telegramium.bots.client | ||
|
||
import telegramium.bots.InlineQueryResult | ||
|
||
/** @param userId | ||
* Unique identifier of the target user that can use the prepared message | ||
* @param result | ||
* A JSON-serialized object describing the message to be sent | ||
* @param allowUserChats | ||
* Pass True if the message can be sent to private chats with users | ||
* @param allowBotChats | ||
* Pass True if the message can be sent to private chats with bots | ||
* @param allowGroupChats | ||
* Pass True if the message can be sent to group and supergroup chats | ||
* @param allowChannelChats | ||
* Pass True if the message can be sent to channel chats | ||
*/ | ||
final case class SavePreparedInlineMessageReq( | ||
userId: Long, | ||
result: InlineQueryResult, | ||
allowUserChats: Option[Boolean] = Option.empty, | ||
allowBotChats: Option[Boolean] = Option.empty, | ||
allowGroupChats: Option[Boolean] = Option.empty, | ||
allowChannelChats: Option[Boolean] = Option.empty | ||
) |
Oops, something went wrong.