Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.9.0 #344

Merged
merged 48 commits into from
Feb 13, 2025
Merged

7.9.0 #344

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f60303b
improve validator
vendelieu Jan 2, 2025
954b37e
remove redundant parameters
vendelieu Jan 2, 2025
b1f34cc
use TgException instead of IllegalArgumentException
vendelieu Jan 2, 2025
c4b1a32
commonize deprecation in action extensions
vendelieu Jan 2, 2025
25a9840
add since reference for flow
vendelieu Jan 2, 2025
cda508a
Update dependency eu.vendeli:re.this to v0.2.0 (#324)
renovate[bot] Jan 4, 2025
2dde50c
Update dependency ch.qos.logback:logback-classic to v1.5.16 (#325)
renovate[bot] Jan 6, 2025
b3976a7
Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to…
renovate[bot] Jan 6, 2025
3c84fb7
Update dependency org.jetbrains.kotlinx.kover to v0.9.1 (#327)
renovate[bot] Jan 8, 2025
d7129cc
add token env
vendelieu Jan 9, 2025
b4ba0ad
improve method invocation logic
vendelieu Jan 9, 2025
ce560ee
change logging lvl
vendelieu Jan 9, 2025
dd7bdd6
change accessibility modifier to TgInvocationKind
vendelieu Jan 9, 2025
469acb9
Provide more info about helper annotations.
vendelieu Jan 10, 2025
8177f0f
update yarn
vendelieu Jan 11, 2025
293b597
add missing failure handling to invocation
vendelieu Jan 11, 2025
e88ec18
Update dependency io.mockk:mockk to v1.13.16 (#329)
renovate[bot] Jan 11, 2025
95d3161
improve test
vendelieu Jan 12, 2025
9bc0e0c
option to disable logging provider handling
vendelieu Jan 12, 2025
90fbcf0
add helper parameters for MaybeInacessibleMessage
vendelieu Jan 13, 2025
83e24d0
note changes
vendelieu Jan 13, 2025
910a206
Update dependency eu.vendeli:re.this to v0.2.1 (#331)
renovate[bot] Jan 15, 2025
6f2eaeb
Update dependency eu.vendeli:re.this to v0.2.2 (#332)
renovate[bot] Jan 17, 2025
2e0b0bf
Update dependency eu.vendeli:re.this to v0.2.3 (#333)
renovate[bot] Jan 18, 2025
891966f
use buffer in parsing instead of strings
vendelieu Jan 20, 2025
c211042
Update dependency eu.vendeli:re.this to v0.2.4 (#335)
renovate[bot] Jan 21, 2025
39e81f4
propogate exception in lp handler
vendelieu Jan 21, 2025
cdb1bf1
return command parsing to text
vendelieu Jan 25, 2025
e068ac8
return command parsing to text
vendelieu Jan 25, 2025
570d50e
fix handler
vendelieu Jan 25, 2025
dc8c84e
fix handler
vendelieu Jan 25, 2025
dfd7dcf
fix handler
vendelieu Jan 26, 2025
408fc15
Update dependency dev.scottpierce:kotlin-env-var to v1.0.5 (#336)
renovate[bot] Jan 26, 2025
b903dfb
Update dependency gradle to v8.12.1 (#337)
renovate[bot] Jan 26, 2025
fc84023
Update dependency org.springframework.boot:spring-boot-starter to v3.…
renovate[bot] Jan 26, 2025
54e469f
Update dependency org.jetbrains.kotlin:kotlin-reflect to v2.1.10 (#339)
renovate[bot] Jan 27, 2025
181c3ac
Update ksp to v2.1.10-1.0.29 (#340)
renovate[bot] Jan 29, 2025
4d07c48
Update dependency com.gradle.plugin-publish to v1.3.1 (#341)
renovate[bot] Jan 30, 2025
f2a2cac
fix chat link
vendelieu Feb 3, 2025
419c879
add warning also for unprocessed
vendelieu Feb 5, 2025
9bde59b
Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.2 (#…
renovate[bot] Feb 11, 2025
bc44029
Update dependency io.ktor:ktor-client-winhttp to v3.1.0 (#343)
renovate[bot] Feb 11, 2025
d6f7c12
Update Bot API spec.
vendelieu Feb 13, 2025
233ae28
implement api changes
vendelieu Feb 13, 2025
e384d78
release preparations
vendelieu Feb 13, 2025
a638ba7
note changes
vendelieu Feb 13, 2025
85a00cb
update shortcut appropriately
vendelieu Feb 13, 2025
90fddbc
fix test
vendelieu Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Telegram chat
url: https://t.me/vennyTgBot
url: https://t.me/venny_tgbot
about: Please feel free to ask and answer usage-related questions here.
1 change: 1 addition & 0 deletions .github/workflows/ci.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
BOT_TOKEN_2: ${{ secrets.BOT_TOKEN_2 }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
PAYMENT_PROVIDER_TOKEN: ${{ secrets.PAYMENT_PROVIDER_TOKEN }}
run: ./gradlew koverXmlReport

- name: Upload coverage to Codecov
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Telegram-bot (KtGram) Changelog

## 7.9.0

* Supported Telegram API [8.3](https://core.telegram.org/bots/api-changelog#february-12-2025).
* Added `isAccessible` and `accessibleOrNull()` to `MaybeInaccessibleMessage` to make easier handling.
* Added `handleLoggingProvider` parameter to plugin, to give option to disable handling of logging provider.
* Added warnings when helper annotations used for inappropriate handlers.

## 7.8.0

* Supported Telegram API [8.2](https://core.telegram.org/bots/api-changelog#january-1-2025).
Expand Down
165 changes: 148 additions & 17 deletions buildSrc/src/main/resources/api.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "Bot API 8.2",
"release_date": "January 1, 2025",
"changelog": "https://core.telegram.org/bots/api#january-1-2025",
"version": "Bot API 8.3",
"release_date": "February 12, 2025",
"changelog": "https://core.telegram.org/bots/api#february-12-2025",
"methods": {
"getUpdates": {
"name": "getUpdates",
Expand Down Expand Up @@ -332,6 +332,14 @@
"required": true,
"description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)"
},
{
"name": "video_start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "New start timestamp for the forwarded video in the message"
},
{
"name": "disable_notification",
"types": [
Expand Down Expand Up @@ -464,6 +472,14 @@
"required": true,
"description": "Message identifier in the chat specified in from_chat_id"
},
{
"name": "video_start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "New start timestamp for the copied video in the message"
},
{
"name": "caption",
"types": [
Expand Down Expand Up @@ -1118,6 +1134,23 @@
"required": false,
"description": "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 information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "cover",
"types": [
"InputFile",
"String"
],
"required": false,
"description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "Start timestamp for the video in the message"
},
{
"name": "caption",
"types": [
Expand Down Expand Up @@ -2610,7 +2643,7 @@
"name": "setMessageReaction",
"href": "https://core.telegram.org/bots/api#setmessagereaction",
"description": [
"Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success."
"Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success."
],
"returns": [
"Boolean"
Expand Down Expand Up @@ -5755,7 +5788,7 @@
"name": "getAvailableGifts",
"href": "https://core.telegram.org/bots/api#getavailablegifts",
"description": [
"Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object."
"Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object."
],
"returns": [
"Gifts"
Expand All @@ -5765,7 +5798,7 @@
"name": "sendGift",
"href": "https://core.telegram.org/bots/api#sendgift",
"description": [
"Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success."
"Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success."
],
"returns": [
"Boolean"
Expand All @@ -5776,8 +5809,17 @@
"types": [
"Integer"
],
"required": true,
"description": "Unique identifier of the target user that will receive the gift"
"required": false,
"description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift."
},
{
"name": "chat_id",
"types": [
"Integer",
"String"
],
"required": false,
"description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift."
},
{
"name": "gift_id",
Expand All @@ -5801,7 +5843,7 @@
"String"
],
"required": false,
"description": "Text that will be shown along with the gift; 0-255 characters"
"description": "Text that will be shown along with the gift; 0-128 characters"
},
{
"name": "text_parse_mode",
Expand Down Expand Up @@ -6541,7 +6583,7 @@
"String"
],
"required": false,
"description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."
"description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable\"). Telegram will display this message to the user."
}
]
},
Expand Down Expand Up @@ -7625,6 +7667,14 @@
"required": false,
"description": "Optional. Default chat member permissions, for groups and supergroups"
},
{
"name": "can_send_gift",
"types": [
"Boolean"
],
"required": false,
"description": "Optional. True, if gifts can be sent to the chat"
},
{
"name": "can_send_paid_media",
"types": [
Expand Down Expand Up @@ -9395,6 +9445,22 @@
"required": false,
"description": "Optional. Video thumbnail"
},
{
"name": "cover",
"types": [
"Array of PhotoSize"
],
"required": false,
"description": "Optional. Available sizes of the cover of the video in the message"
},
{
"name": "start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "Optional. Timestamp in seconds from which the video will play in the message"
},
{
"name": "file_name",
"types": [
Expand Down Expand Up @@ -14104,12 +14170,27 @@
{
"name": "thumbnail",
"types": [
"InputFile",
"String"
],
"required": false,
"description": "Optional. 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 information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "cover",
"types": [
"String"
],
"required": false,
"description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "Optional. Start timestamp for the video in the message"
},
{
"name": "caption",
"types": [
Expand Down Expand Up @@ -14213,7 +14294,6 @@
{
"name": "thumbnail",
"types": [
"InputFile",
"String"
],
"required": false,
Expand Down Expand Up @@ -14314,7 +14394,6 @@
{
"name": "thumbnail",
"types": [
"InputFile",
"String"
],
"required": false,
Expand Down Expand Up @@ -14399,7 +14478,6 @@
{
"name": "thumbnail",
"types": [
"InputFile",
"String"
],
"required": false,
Expand Down Expand Up @@ -14516,12 +14594,27 @@
{
"name": "thumbnail",
"types": [
"InputFile",
"String"
],
"required": false,
"description": "Optional. 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 information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "cover",
"types": [
"String"
],
"required": false,
"description": "Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \"attach://<file_attach_name>\" to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files"
},
{
"name": "start_timestamp",
"types": [
"Integer"
],
"required": false,
"description": "Optional. Start timestamp for the video in the message"
},
{
"name": "width",
"types": [
Expand Down Expand Up @@ -17782,7 +17875,7 @@
"name": "SuccessfulPayment",
"href": "https://core.telegram.org/bots/api#successfulpayment",
"description": [
"This object contains basic information about a successful payment."
"This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control."
],
"fields": [
{
Expand Down Expand Up @@ -18193,6 +18286,7 @@
"description": [
"This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of",
"- TransactionPartnerUser",
"- TransactionPartnerChat",
"- TransactionPartnerAffiliateProgram",
"- TransactionPartnerFragment",
"- TransactionPartnerTelegramAds",
Expand All @@ -18201,6 +18295,7 @@
],
"subtypes": [
"TransactionPartnerUser",
"TransactionPartnerChat",
"TransactionPartnerAffiliateProgram",
"TransactionPartnerFragment",
"TransactionPartnerTelegramAds",
Expand Down Expand Up @@ -18284,6 +18379,42 @@
"TransactionPartner"
]
},
"TransactionPartnerChat": {
"name": "TransactionPartnerChat",
"href": "https://core.telegram.org/bots/api#transactionpartnerchat",
"description": [
"Describes a transaction with a chat."
],
"fields": [
{
"name": "type",
"types": [
"String"
],
"required": true,
"description": "Type of the transaction partner, always \"chat\""
},
{
"name": "chat",
"types": [
"Chat"
],
"required": true,
"description": "Information about the chat"
},
{
"name": "gift",
"types": [
"Gift"
],
"required": false,
"description": "Optional. The gift sent to the chat by the bot"
}
],
"subtype_of": [
"TransactionPartner"
]
},
"TransactionPartnerAffiliateProgram": {
"name": "TransactionPartnerAffiliateProgram",
"href": "https://core.telegram.org/bots/api#transactionpartneraffiliateprogram",
Expand Down Expand Up @@ -18420,7 +18551,7 @@
"name": "StarTransaction",
"href": "https://core.telegram.org/bots/api#startransaction",
"description": [
"Describes a Telegram Star transaction."
"Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control."
],
"fields": [
{
Expand Down
Loading
Loading