1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-08-15 21:56:29 +00:00

Compare commits

...

17 Commits

Author SHA1 Message Date
b913f66b1e fixes 2026-08-15 14:22:35 +06:00
6fbe2e5649 improve replies with ephemeral 2026-08-15 00:15:12 +06:00
8b0e0bf820 fix of Replyparameters calls 2026-08-14 20:16:47 +06:00
4f19cb7626 improvemens? 2026-08-13 17:51:33 +06:00
d48e951232 Require ephemeral receiver/message id and add EphemeralChatId variants
Ephemeral edit/delete/replyToEphemeral requests no longer derive receiverUserId
and ephemeralMessageId from a throwing default: both are plain required
parameters again. Each chatId-taking form instead gained a convenience variant
accepting an EphemeralChatId, which sources both values from the identifier and
delegates to the required-parameter form, so a missing ephemeralMessageId fails
in the thin overload rather than during serialization.

Adds EphemeralChatIdRequestsTest covering the delegation of the core variants.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 19:24:56 +06:00
a1d2ebb4dc Add EphemeralChatId and identifier-sourced ephemeral defaults
New EphemeralChatId inheritor of IdChatIdentifier carrying receiverUser and
ephemeralMessageId (mirroring ChatIdWithThreadId), with ChatIdentifier.receiverUser/
ephemeralMessageId extensions like ChatIdentifier.threadId. Every send/reply/edit/
delete method that takes receiverUserId/ephemeralMessageId now defaults them from
the chat identifier, so passing an EphemeralChatId auto-fills them the same way a
ChatIdWithThreadId fills threadId.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 12:05:18 +06:00
bc52be7b40 Document the plan/code/check agent pipeline in HELPERS
Add a rule describing the three-phase subagent pipeline (Plan/Architect ->
Coding -> Check) and the best/high/medium model tiers (Fable/Opus/Sonnet).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:23:13 +06:00
a2f670834e Note support of Telegram Bot API 10.2
Bump README supported-version badge to 10.2 and add the Bot API 10.2 support
banner to the 36.0.0 changelog entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 21:08:19 +06:00
3d47034f54 Add Bot API 10.2 subscription updates support
New BotSubscriptionUpdated payload (user, invoicePayload, typed state:
Canceled/Active/Failed/Unknown) in dev.inmo.tgbotapi.types.payments and the
BotSubscriptionUpdatedUpdate for the new subscription update
(UPDATE_SUBSCRIPTION), FlowsUpdatesFilter.botSubscriptionUpdatedUpdatesFlow,
onBotSubscriptionUpdated trigger, waitBotSubscriptionUpdated expectation and
class casts. Notes the Telegram-side Mini App method-origin security hardening.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 21:07:42 +06:00
0c329326f7 Add Bot API 10.2 Communities support
New communities domain: Community + CommunityId, CommunityChatAdded and
CommunityChatRemoved service messages (CommonEvent) wired through RawMessage,
ChatFullInfo/ExtendedChat.community (including ExtendedBot), plus
onCommunityChatAdded/onCommunityChatRemoved triggers and wait expectations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 20:47:15 +06:00
838caae7f5 Add Bot API 10.2 Ephemeral Messages support
New ephemeral messaging surface: EphemeralMessageId, Message.receiverUser/
ephemeralMessageId (PossiblyEphemeralMessage on group message impls),
BotCommand.isEphemeral, receiverUserId/callbackQueryId parameters across the 13
covered send methods (core requests, per-type api extensions and the
Sends/Replies/RepliesWithChatsAndMessages aggregators), editEphemeralMessageText/
Media/Caption/ReplyMarkup and deleteEphemeralMessage, plus replyToEphemeral
helpers and smart-branch ephemeral replies.

BREAKING: ReplyParameters.messageId and chatIdentifier are now nullable and the
WithMessageId supertype was dropped so ephemeral_message_id-only replies can be
expressed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 20:25:59 +06:00
16be206b0f Add Bot API 10.2 Rich Messages support
Input-side rich messages: InputRichMessage.blocks/media fields, 21
InputRichBlock* block types + InputRichBlockSerializer, InputRichBlockListItem,
InputRichMessageMedia, TelegramMediaVoiceNote + RichMessageMemberTelegramMedia
marker on Animation/Audio/Photo/Video, DSL builders, and multipart upload for
SendRichMessage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 19:16:07 +06:00
0b3a5bb0af start 36.0.0 2026-07-18 18:31:03 +06:00
c7761fd294 Merge pull request #1053 from InsanusMokrassar/35.1.0
35.1.0
2026-07-01 18:01:07 +06:00
0e9f9111eb Update dependencies and migrate to Gradle 9 / Dokka v2
Dependency bumps: Kotlin 2.3.20->2.3.21, Coroutines 1.10.2->1.11.0,
Ktor 3.4.2->3.5.1, KSP 2.3.6->2.3.9, MicroUtils 0.29.2->0.30.0,
Dokka 2.0.0->2.2.0, Versions plugin 0.53.0->0.54.0, NMCP 1.4.4->1.6.0.

Gradle wrapper 8.13->9.6.1 with build-script fixes for Gradle 9:
Project.exec() -> providers.exec(), tasks.whenTaskAdded -> tasks.configureEach.

Dokka migrated to the Dokka Gradle Plugin v2. The docs module is now
included as the KDocs aggregator (dokka {} DSL with sourceRoots, new URI,
ProcessIsolation heap for the generator worker), excluded from binary
compatibility validation, and the kdocs workflow runs :docs:dokkaGenerate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 17:54:13 +06:00
763b07fc3c start 35.1.0 2026-07-01 16:08:25 +06:00
481a3b4ff1 Merge pull request #1052 from InsanusMokrassar/35.0.0
35.0.0
2026-07-01 15:43:02 +06:00
111 changed files with 11230 additions and 1244 deletions

View File

@@ -12,10 +12,10 @@ jobs:
with:
java-version: 17
- name: Build
run: ./gradlew dokkaHtmlMultiModule
run: ./gradlew :docs:dokkaGenerate
- name: Publish KDocs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/dokka/htmlMultiModule
publish_dir: ./docs/build/dokka/html
publish_branch: kdocs

View File

@@ -1,5 +1,69 @@
# TelegramBotAPI changelog
## 36.0.0
**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.2](https://core.telegram.org/bots/api-changelog#july-14-2026)**
**Breaking changes**:
* `ReplyParameters` is now a sealed interface with nested `ReplyParameters.Chat` and `ReplyParameters.Ephemeral` implementations; overloaded `ReplyParameters(...)` companion factories construct both regular-message and ephemeral-message variants
* The 4 group-family message implementations (`CommonGroupContentMessageImpl`, `CommonForumContentMessageImpl`, `CommonChannelDirectMessagesContentMessageImpl`, `CommonSuggestedChannelDirectMessagesContentMessageImpl`) gained trailing `receiverUser`/`ephemeralMessageId` primary-constructor parameters (defaulted to `null`) — positional construction of these classes must be updated
* `reply(to = ...)` overloads for the 13 ephemeral-capable senders (see below) now detect an ephemeral `to` target (`to is PossiblyEphemeralMessage && to.ephemeralMessageId != null`) and automatically address the reply through `ephemeral_message_id`, sending the outgoing message itself as ephemeral to the same receiver — this is a behavior change for any existing code that replies to a message carrying a non-null `ephemeralMessageId`
**Migration advice**: Keep `ReplyParameters(...)` for both chat-message and ephemeral-message targets; explicit `ReplyParameters.Ephemeral(...)` subtype construction also remains available; pass `receiverUser`/`ephemeralMessageId` explicitly (or rely on their `null` default) when constructing the 4 group-family message implementations positionally
* `Core`:
* (`Rich Messages`) Added `InputRichBlock` hierarchy with all 21 `InputRichBlock*` types (mirroring the received `RichBlock*` hierarchy and reusing `RichText`/`RichBlockCaption`/`RichBlockTableCell`), the label-less `InputRichBlockListItem` and the `InputRichBlockSerializer`; every `InputRichBlock` exposes `subBlocks` navigation
* (`Rich Messages`) Added `TelegramMediaVoiceNote` (`InputMediaVoiceNote`) and the `RichMessageMemberTelegramMedia` marker interface implemented by it, `TelegramMediaAnimation`, `TelegramMediaAudio`, `TelegramMediaPhoto` and `TelegramMediaVideo`; added `VoiceFile.toTelegramMediaVoiceNote` converters
* (`Rich Messages`) Added `InputRichMessageMedia` type (media referenced from `InputRichMessage.html`/`.markdown` via `tg://photo?id=`, `tg://video?id=` and `tg://audio?id=` links)
* (`Rich Messages`) `InputRichMessage` gained `blocks` and `media` fields ("exactly one of `html`, `markdown` or `blocks` must be used") and the `InputRichMessageBlocks` factory; `InputRichMessageHTML`/`InputRichMessageMarkdown` gained a trailing `media` parameter
* (`Rich Messages`) Added Rich Messages input DSL builders `buildInputRichBlocks`/`InputRichBlocksBuilder`, `InputRichBlockListBuilder` and the `InputRichMessageBlocks { }` builder overload (marked with the `@RichTextDsl` DSL marker)
* (`Rich Messages`) `SendRichMessage` now supports `attach://` upload of new files referenced from `InputRichMessage.blocks`/`.media`; `SendRichMessageDraft` now rejects rich messages that require direct file upload (unsupported by the method)
* (`Ephemeral Messages`) Added `EphemeralMessageId` value class, `PossiblyEphemeralMessage` (`receiverUser`/`ephemeralMessageId`) and `EphemeralMessageAction` (`receiverUserId`/`ephemeralMessageId`) abstractions
* (`Ephemeral Messages`) `RawMessage` parses `receiver_user`/`ephemeral_message_id`; the 4 group-family `Common*ContentMessage` types (`CommonGroupContentMessage`, `CommonForumContentMessage`, `CommonChannelDirectMessagesContentMessage`, `CommonSuggestedChannelDirectMessagesContentMessage`, via the shared `PotentiallyFromUserGroupContentMessage`) now also implement `PossiblyEphemeralMessage`
* (`Ephemeral Messages`) `BotCommand` gained the `isEphemeral` field
* (`Ephemeral Messages`) `ReplyParameters` became a sealed interface with nested `Chat` and `Ephemeral` implementations and a shared surrogate-backed serializer preserving the flat Bot API JSON shape; added the `Message.ephemeralReplyParametersOrNull()`/`Message.ephemeralReplyReceiverUserIdOrNull` helpers used by the `reply(to = ...)` smart-branch
* (`Ephemeral Messages`) `ReplyParameters.Ephemeral` and `Message.ephemeralReplyParametersOrNull()` support and forward `allowSendingWithoutReply`, `checklistTaskId`, and `pollOptionId` together with `ephemeralMessageId`
* (`Ephemeral Messages`) Added `receiverUserId`/`callbackQueryId` params (via the new `OptionallyEphemeralSendRequest`) to the 13 ephemeral-capable send requests: `SendTextMessage`, `SendContact`, `SendLocation` (`Static`/`Live`), `SendVenue`, `SendPhotoData`, `SendLivePhotoData`, `SendAudioData`, `SendDocumentData`, `SendVideoData`, `SendAnimationData`, `SendVoiceData`, `SendVideoNoteData`, `SendStickerByFileId`
* (`Ephemeral Messages`) Added `EditEphemeralMessageText`/`EditEphemeralMessageMedia`/`EditEphemeralMessageCaption`/`EditEphemeralMessageReplyMarkup` and `DeleteEphemeralMessage` requests (all return `Unit`, mirroring the inline-message edit family); `EditEphemeralMessageMedia` rejects `MultipartFile` media (new file upload is not supported for ephemeral edits)
* (`Ephemeral Messages`) Added `EphemeralChatId` (`IdChatIdentifier`, carrying `chatId`/`receiverUser`/`ephemeralMessageId`) and the `ChatIdentifier.receiverUser`/`ChatIdentifier.ephemeralMessageId` extensions (mirroring `ChatIdentifier.threadId`); `FullChatIdentifierSerializer` gained the `chatId/eph/receiverUserChatId/ephemeralMessageId` string format. The nullable `receiverUserId` param of the 13 ephemeral-capable send requests still defaults from the passed `chatId` when it is an `EphemeralChatId`; `DeleteEphemeralMessage` and `EditEphemeralMessageText`/`EditEphemeralMessageCaption`/`EditEphemeralMessageMedia`/`EditEphemeralMessageReplyMarkup` instead keep `receiverUserId`/`ephemeralMessageId` REQUIRED on their primary constructor/factory form, gaining `EphemeralChatId`-taking secondary constructors/factory overloads that source both params from the identifier (throwing `IllegalArgumentException` if it carries no `ephemeralMessageId`)
* (`Communities`) Added `CommunityId` value class and `Community` type (`id`/`name`)
* (`Communities`) Added `CommunityChatAdded` (`community`) and `CommunityChatRemoved` (fieldless) chat events (`CommonEvent`); `RawMessage` parses `community_chat_added`/`community_chat_removed`
* (`Communities`) Added `community` field to `ExtendedChat` (`ChatFullInfo.community`), parsed for `ExtendedChannelChatImpl`, `ExtendedGroupChatImpl`, `ExtendedSupergroupChatImpl`, `ExtendedForumChatImpl`, `ExtendedChannelDirectMessagesChatImpl` and `ExtendedBot`
* (`Bot Subscriptions`) Added `BotSubscriptionUpdated` (`user`, `invoicePayload`, `state`) and `BotSubscriptionUpdatedUpdate`; `state` is modeled as the typed sealed `BotSubscriptionUpdated.State` (`Canceled`/`Active`/`Failed`, with an `Unknown` fallback), mirroring `TransactionType`
* (`Bot Subscriptions`) `RawUpdate` parses the new `subscription` field; added `UPDATE_SUBSCRIPTION` to `ALL_UPDATES_LIST_WITHOUT_REACTIONS`; `FlowsUpdatesFilter` gained `botSubscriptionUpdatedUpdatesFlow`
* `API`:
* (`Ephemeral Messages`) Threaded `receiverUserId`/`callbackQueryId` through the `sendXxx`/`send`/`reply`/`replyWithXxx` extensions for the 13 ephemeral-capable senders (`send/Sends.kt`, `send/Replies.kt`, `send/RepliesWithChatsAndMessages.kt` and their per-type extension files); `reply(to = ...)` now automatically sends an ephemeral reply when `to` is itself ephemeral (see Breaking changes)
* (`Ephemeral Messages`) Ephemeral-capable `reply(to = ...)` overloads gained `replyToEphemeralMessageId`, defaulting from `PossiblyEphemeralMessage.ephemeralMessageId`; direct and dispatcher overloads forward the explicit target into `ephemeralReplyParametersOrNull`
* (`Ephemeral Messages`) Added 48 ephemeral-only `reply`/`replyWithXxx` overloads in `RepliesWithEphemeral.kt` without a `ChatMessage`; each overload requires `replyInChatId`, `receiverUserId`, and `replyToEphemeralMessageId`, with complete content-form and dispatcher parity across the 13 ephemeral-capable senders
* (`Ephemeral Messages`) Added `editEphemeralMessageText`/`editEphemeralMessageMedia`/`editEphemeralMessageCaption`/`editEphemeralMessageReplyMarkup` and `deleteEphemeralMessage` `TelegramBot` extensions (the latter also accepts a `PossiblyEphemeralMessage` directly)
* (`Ephemeral Messages`) Added explicit `replyToEphemeral`/`replyToEphemeralWithXxx` `TelegramBot` extensions for the 13 ephemeral-capable senders, replying to an ephemeral message by `chatId`/`ephemeralMessageId` without requiring the original `Message` object
* (`Ephemeral Messages`) `receiverUserId`/`ephemeralMessageId` params of the edit/delete/`replyToEphemeral*` extensions remain REQUIRED on the `chatId: ChatIdentifier`/`chat: Chat` forms; each `chatId: ChatIdentifier` form additionally gained a convenience overload taking `chatId: EphemeralChatId` (dropping `receiverUserId`/`ephemeralMessageId`) that sources both from the identifier, throwing `IllegalArgumentException` if it carries no `ephemeralMessageId` (the `chat: Chat` forms got no such overload, since `Chat.id` is statically only an `IdChatIdentifier`); `Replies.kt`'s `receiverUserId` default now also checks `replyInChatId.receiverUser` before falling back to `to.ephemeralReplyReceiverUserIdOrNull`
* (`Ephemeral Messages`) Not covered by this iteration (follow-up): `createResend`/`ResendMessage` do not carry ephemeral fields (a resend is always a regular message); `handleLiveLocation` and the generic `reply(mediaFile = ...)`/`reply(content = ...)` dispatchers in `RepliesWithChatsAndMessages.kt`'s `copyMessage`/live-location branches are unaffected; `behaviour_builder` triggers/waiters gained no ephemeral-specific helpers
* `BehaviourBuilder`:
* (`Communities`) Added `onCommunityChatAdded`/`onCommunityChatRemoved` triggers
* (`Communities`) Added `waitCommunityChatAdded`/`waitCommunityChatRemoved` and `waitCommunityChatAddedEventsMessages`/`waitCommunityChatRemovedEventsMessages` expectations
* (`Bot Subscriptions`) Added `onBotSubscriptionUpdated` trigger, `waitBotSubscriptionUpdated` expectation and `ByUserBotSubscriptionUpdatedMarkerFactory`
* `Utils`:
* (`Bot Subscriptions`) Added class casts for `BotSubscriptionUpdatedUpdate` (`whenBotSubscriptionUpdatedUpdate`/`asBotSubscriptionUpdatedUpdate`/`requireBotSubscriptionUpdatedUpdate`); regenerated class casts extensions (`botSubscriptionUpdatedUpdateOrNull`/`OrThrow`, `botSubscriptionUpdatedOrNull`/`OrThrow`)
* `WebApps`:
* Telegram hardened Mini App method-origin security, auto-enabling for all Mini Apps on July 20, 2026; no library change required
## 35.1.0
* `Dependencies`:
* `Kotlin`: `2.3.20` -> `2.3.21`
* `Coroutines`: `1.10.2` -> `1.11.0`
* `Ktor`: `3.4.2` -> `3.5.1`
* `KSP`: `2.3.6` -> `2.3.9`
* `MicroUtils`: `0.29.2` -> `0.30.0`
* `Dokka`: `2.0.0` -> `2.2.0`
* `Versions`: `0.53.0` -> `0.54.0`
* `NMCP`: `1.4.4` -> `1.6.0`
* `Build`:
* Updated Gradle wrapper `8.13` -> `9.6.1` and migrated build scripts to be Gradle 9 compatible (`Project.exec` -> `providers.exec`, `tasks.whenTaskAdded` -> `tasks.configureEach`)
* Migrated Dokka documentation to the Dokka Gradle Plugin v2: the `docs` module is now included in the build as the KDocs aggregator (`./gradlew :docs:dokkaGenerate`) and the `Publish KDocs` workflow was updated accordingly
## 35.0.0
**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.1](https://core.telegram.org/bots/api-changelog#june-11-2026)**

View File

@@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-10.1-blue)](https://core.telegram.org/bots/api-changelog#june-11-2026)
# TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-10.2-blue)](https://core.telegram.org/bots/api-changelog#july-14-2026)
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

View File

@@ -60,3 +60,13 @@ All work MUST be performed in the normal (main) working worktree of the reposito
---
When a prompt contains a list of several subtasks, run each subtask as its own subagent (one subagent per subtask) instead of doing all of them inline in the main thread.
---
For any substantial change, drive it through a three-phase agent pipeline, each phase run as its own subagent(s), and each section/subtask committed separately:
1. **Plan / Architect** the changes — model range best → medium, best is the most suitable.
2. **Coding / implementation** — model range medium → high, medium is the most suitable.
3. **Check / validation** — model range high → best, high is the most suitable.
Model tiers: **best = Fable**, **high = Opus**, **medium = Sonnet**. (Tier names, not the concrete models, are the contract — remap the models if the roster changes.)

View File

@@ -21,6 +21,11 @@ plugins {
alias(libs.plugins.nmcp.aggregation)
}
// docs is a dokka-only aggregator module, exclude it from binary compatibility validation
apiValidation {
ignoredProjects += ["docs"]
}
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
nmcpAggregation {
@@ -44,7 +49,7 @@ allprojects {
mavenLocal()
}
if (it != rootProject.findProject("docs")) {
tasks.whenTaskAdded { task ->
tasks.configureEach { task ->
if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") {
task.enabled = false
}
@@ -54,13 +59,9 @@ allprojects {
apply from: "./extensions.gradle"
private String getCurrentVersionChangelog() {
OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
standardOutput = changelogDataOS
return providers.exec {
commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
}
return changelogDataOS.toString().trim()
}.standardOutput.asText.get().trim()
}

View File

@@ -39,14 +39,10 @@ private List<SourceDirectorySet> findSourcesWithName(String... approximateNames)
}.collect { it.kotlin }
}
Object callback = {
switch (true) {
case project.hasProperty("DOKKA_PATH"):
outputDirectory = project.property("DOKKA_PATH").toString()
break
case System.getenv("DOKKA_PATH") != null:
outputDirectory = System.getenv("DOKKA_PATH")
break
dokka {
// aggregating every module's sources into one publication needs more heap than the worker default
dokkaGeneratorIsolation = ProcessIsolation {
it.maxHeapSize.set("4g")
}
dokkaSourceSets {
@@ -55,7 +51,7 @@ Object callback = {
sourceLink {
localDirectory.set(file("../"))
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi"))
remoteUrl.set(new URI("https://github.com/InsanusMokrassar/ktgbotapi"))
remoteLineSuffix.set("#L")
}
}
@@ -73,6 +69,3 @@ Object callback = {
}
}
}
tasks.dokkaGfm(callback)
tasks.dokkaHtml(callback)

View File

@@ -6,4 +6,4 @@ kotlin.incremental=true
kotlin.incremental.js=true
library_group=dev.inmo
library_version=35.0.0
library_version=36.0.0

View File

@@ -1,28 +1,28 @@
[versions]
kotlin = "2.3.20"
kotlin = "2.3.21"
kotlin-serialization = "1.11.0"
kotlin-coroutines = "1.10.2"
kotlin-coroutines = "1.11.0"
javax-activation = "1.1.1"
korlibs = "5.4.0"
uuid = "0.8.4"
ktor = "3.4.2"
ktor = "3.5.1"
ksp = "2.3.6"
ksp = "2.3.9"
kotlin-poet = "2.3.0"
microutils = "0.29.2"
microutils = "0.30.0"
kslog = "1.6.1"
versions = "0.53.0"
versions = "0.54.0"
github-release-plugin = "2.5.2"
dokka = "2.0.0"
dokka = "2.2.0"
validator = "0.18.1"
nmcp = "1.4.4"
nmcp = "1.6.0"
[libraries]

Binary file not shown.

View File

@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip

315
gradlew vendored
View File

@@ -1,78 +1,129 @@
#!/usr/bin/env sh
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn ( ) {
warn () {
echo "$*"
}
} >&2
die ( ) {
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

78
gradlew.bat vendored
View File

@@ -1,4 +1,22 @@
@if "%DEBUG%" == "" @echo off
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -9,25 +27,29 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -35,48 +57,36 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

View File

@@ -1,11 +1,4 @@
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "org.jetbrains.dokka") {
useModule("org.jetbrains.dokka:dokka-gradle-plugin:${requested.version}")
}
}
}
repositories {
gradlePluginPortal()
}
@@ -19,3 +12,4 @@ include ":tgbotapi.behaviour_builder"
include ":tgbotapi.behaviour_builder.fsm"
include ":tgbotapi"
include ":tgbotapi.webapps"
include ":docs"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.DeleteEphemeralMessage
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.EphemeralChatId
import dev.inmo.tgbotapi.types.EphemeralMessageId
import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage
public suspend fun TelegramBot.deleteEphemeralMessage(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId
): Unit = execute(
DeleteEphemeralMessage(chatId, receiverUserId, ephemeralMessageId)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.deleteEphemeralMessage(
chatId: EphemeralChatId
): Unit = execute(
DeleteEphemeralMessage(chatId)
)
public suspend fun TelegramBot.deleteEphemeralMessage(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId
): Unit = deleteEphemeralMessage(chat.id, receiverUserId, ephemeralMessageId)
/**
* Convenience overload requiring [message] to carry non-null [PossiblyEphemeralMessage.receiverUser] and
* [PossiblyEphemeralMessage.ephemeralMessageId] (as returned by any of the ephemeral send requests)
*/
public suspend fun TelegramBot.deleteEphemeralMessage(
message: PossiblyEphemeralMessage
): Unit = deleteEphemeralMessage(
message.chat.id,
message.receiverUser ?.id ?: error("Message ${message.messageId} in chat ${message.chat.id} is not ephemeral: receiverUser is null"),
message.ephemeralMessageId ?: error("Message ${message.messageId} in chat ${message.chat.id} is not ephemeral: ephemeralMessageId is null")
)

View File

@@ -0,0 +1,103 @@
package dev.inmo.tgbotapi.extensions.api.edit.caption
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.caption.EditEphemeralMessageCaption
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageCaption(chatId, receiverUserId, ephemeralMessageId, caption, parseMode, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: EphemeralChatId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageCaption(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
caption,
parseMode,
replyMarkup
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageCaption(chat.id, receiverUserId, ephemeralMessageId, caption, parseMode, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageCaption(chatId, receiverUserId, ephemeralMessageId, entities, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chatId: EphemeralChatId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageCaption(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
entities,
replyMarkup
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageCaption(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageCaption(chat.id, receiverUserId, ephemeralMessageId, entities, replyMarkup)

View File

@@ -0,0 +1,49 @@
package dev.inmo.tgbotapi.extensions.api.edit.media
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.media.EditEphemeralMessageMedia
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageMedia(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
media: TelegramFreeMedia,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageMedia(chatId, receiverUserId, ephemeralMessageId, media, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageMedia(
chatId: EphemeralChatId,
media: TelegramFreeMedia,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageMedia(chatId, media, replyMarkup)
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageMedia(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
media: TelegramFreeMedia,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageMedia(chat.id, receiverUserId, ephemeralMessageId, media, replyMarkup)

View File

@@ -0,0 +1,45 @@
package dev.inmo.tgbotapi.extensions.api.edit.reply_markup
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditEphemeralMessageReplyMarkup
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageReplyMarkup(chatId, receiverUserId, ephemeralMessageId, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
chatId: EphemeralChatId,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageReplyMarkup(chatId, replyMarkup)
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageReplyMarkup(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageReplyMarkup(chat.id, receiverUserId, ephemeralMessageId, replyMarkup)

View File

@@ -0,0 +1,200 @@
package dev.inmo.tgbotapi.extensions.api.edit.text
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.text.EditEphemeralMessageText
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
import dev.inmo.tgbotapi.utils.buildEntities
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, text, parseMode, linkPreviewOptions, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: EphemeralChatId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageText(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
text,
parseMode,
linkPreviewOptions,
replyMarkup
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, text, parseMode, linkPreviewOptions, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = execute(
EditEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, entities, linkPreviewOptions, replyMarkup)
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: EphemeralChatId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageText(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
entities,
linkPreviewOptions,
replyMarkup
)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, entities, linkPreviewOptions, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: EphemeralChatId,
separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chatId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: String,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chatId, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chatId: EphemeralChatId,
separator: String,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chatId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: TextSource? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
public suspend fun TelegramBot.editEphemeralMessageText(
chat: Chat,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
separator: String,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null,
builderBody: EntitiesBuilderBody
): Unit = editEphemeralMessageText(chat.id, receiverUserId, ephemeralMessageId, buildEntities(separator, builderBody), linkPreviewOptions, replyMarkup)

View File

@@ -58,6 +58,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -75,6 +77,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -96,6 +100,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -111,6 +117,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -274,6 +282,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -290,6 +300,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -311,6 +323,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -326,6 +340,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -352,6 +368,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -369,6 +387,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -391,6 +411,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -407,6 +429,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -429,6 +453,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -472,6 +498,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -524,6 +552,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -546,6 +576,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -569,6 +601,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -591,6 +625,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -608,6 +644,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -623,6 +661,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -754,6 +794,8 @@ public suspend inline fun TelegramBot.replyWithAnimation(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -777,6 +819,8 @@ public suspend inline fun TelegramBot.replyWithAnimation(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -801,6 +845,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -823,6 +869,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -847,6 +895,8 @@ public suspend inline fun TelegramBot.replyWithAnimation(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -869,6 +919,8 @@ public suspend inline fun TelegramBot.replyWithAnimation(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -892,6 +944,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -913,6 +967,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -939,6 +995,8 @@ public suspend inline fun TelegramBot.replyWithAudio(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -960,6 +1018,8 @@ public suspend inline fun TelegramBot.replyWithAudio(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -980,6 +1040,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -998,6 +1060,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1020,6 +1084,8 @@ public suspend inline fun TelegramBot.replyWithAudio(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1040,6 +1106,8 @@ public suspend inline fun TelegramBot.replyWithAudio(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1059,6 +1127,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1076,6 +1146,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1099,6 +1171,8 @@ public suspend inline fun TelegramBot.replyWithDocument(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1118,6 +1192,8 @@ public suspend inline fun TelegramBot.replyWithDocument(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1138,6 +1214,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1156,6 +1234,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1176,6 +1256,8 @@ public suspend inline fun TelegramBot.replyWithDocument(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1194,6 +1276,8 @@ public suspend inline fun TelegramBot.replyWithDocument(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1213,6 +1297,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1230,6 +1316,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1379,6 +1467,8 @@ public suspend inline fun TelegramBot.replyWithPhoto(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1398,6 +1488,8 @@ public suspend inline fun TelegramBot.replyWithPhoto(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1419,6 +1511,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1438,6 +1532,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1459,6 +1555,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1478,6 +1576,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1499,6 +1599,8 @@ public suspend inline fun TelegramBot.replyWithPhoto(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1517,6 +1619,8 @@ public suspend inline fun TelegramBot.replyWithPhoto(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1537,6 +1641,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1555,6 +1661,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1575,6 +1683,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1593,6 +1703,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1613,6 +1725,8 @@ public suspend inline fun TelegramBot.replyWithSticker(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -1629,6 +1743,8 @@ public suspend inline fun TelegramBot.replyWithSticker(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -1647,6 +1763,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -1663,6 +1781,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -1692,6 +1812,8 @@ public suspend inline fun TelegramBot.replyWithVideo(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1715,6 +1837,8 @@ public suspend inline fun TelegramBot.replyWithVideo(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1736,6 +1860,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1755,6 +1881,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1779,6 +1907,8 @@ public suspend inline fun TelegramBot.replyWithVideo(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1801,6 +1931,8 @@ public suspend inline fun TelegramBot.replyWithVideo(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1821,6 +1953,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1839,6 +1973,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1864,6 +2000,8 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1884,6 +2022,8 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1905,6 +2045,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1924,6 +2066,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1945,6 +2089,8 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1964,6 +2110,8 @@ public suspend inline fun TelegramBot.replyWithLivePhoto(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1984,6 +2132,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2002,6 +2152,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2025,6 +2177,8 @@ public suspend inline fun TelegramBot.replyWithVideoNote(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2043,6 +2197,8 @@ public suspend inline fun TelegramBot.replyWithVideoNote(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2060,6 +2216,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2075,6 +2233,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2098,6 +2258,8 @@ public suspend inline fun TelegramBot.replyWithVoice(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2116,6 +2278,8 @@ public suspend inline fun TelegramBot.replyWithVoice(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2135,6 +2299,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2152,6 +2318,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2172,6 +2340,8 @@ public suspend inline fun TelegramBot.replyWithVoice(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2189,6 +2359,8 @@ public suspend inline fun TelegramBot.replyWithVoice(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -2207,6 +2379,8 @@ public suspend inline fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2223,6 +2397,8 @@ public suspend inline fun TelegramBot.reply(
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3318,6 +3494,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3337,6 +3515,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3355,6 +3535,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3373,6 +3555,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3391,6 +3575,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3409,6 +3595,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3427,6 +3615,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3445,6 +3635,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3463,6 +3655,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3481,6 +3675,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3499,6 +3695,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3522,6 +3720,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3543,6 +3743,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3563,6 +3765,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3583,6 +3787,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3603,6 +3809,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3623,6 +3831,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3643,6 +3853,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3663,6 +3875,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3685,6 +3899,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
replyInDirectMessageThreadId: DirectMessageThreadId? = replyInChatId.directMessageThreadId,
replyInBusinessConnectionId: BusinessConnectionId? = replyInChatId.businessConnectionId,
receiverUserId: UserId? = replyInChatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3705,6 +3921,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3724,6 +3942,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3743,6 +3963,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3761,6 +3983,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3780,6 +4004,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3799,6 +4025,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3818,6 +4046,8 @@ public suspend fun TelegramBot.reply(
replyInThreadId = replyInThreadId,
replyInDirectMessageThreadId = replyInDirectMessageThreadId,
replyInBusinessConnectionId = replyInBusinessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -0,0 +1,553 @@
@file:Suppress("KDocUnresolvedReference")
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.api.send.media.*
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
import dev.inmo.tgbotapi.types.message.content.*
/**
* Explicit helpers replying directly to an incoming ephemeral message identified by [chatId]/[ephemeralMessageId]
* (as opposed to the `reply(to = someMessage, ...)` smart-branch overloads, which detect an ephemeral
* [dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage] target automatically). The outgoing message
* is itself sent as ephemeral, addressed to the same [receiverUserId] as the message being replied to.
*
* Each helper has two forms: one taking explicit `receiverUserId`/`ephemeralMessageId`, and a convenience overload
* taking an [dev.inmo.tgbotapi.types.EphemeralChatId] which sources both from the identifier (throwing
* [IllegalArgumentException] if it does not carry an `ephemeralMessageId`).
*
* @see dev.inmo.tgbotapi.types.ephemeralReplyParametersOrNull
*/
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
*/
public suspend fun TelegramBot.replyToEphemeral(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendMessage(
chatId = chatId,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
*/
public suspend fun TelegramBot.replyToEphemeral(
chatId: EphemeralChatId,
text: String,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = replyToEphemeral(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithPhoto(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto(
chatId = chatId,
fileId = photo,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithPhoto(
chatId: EphemeralChatId,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = replyToEphemeralWithPhoto(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
photo = photo,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithLivePhoto(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
livePhoto: InputFile,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chatId,
livePhoto = livePhoto,
photo = photo,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithLivePhoto(
chatId: EphemeralChatId,
livePhoto: InputFile,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = replyToEphemeralWithLivePhoto(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
livePhoto = livePhoto,
photo = photo,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithAudio(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
audio: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio(
chatId = chatId,
audio = audio,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithAudio(
chatId: EphemeralChatId,
audio: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = replyToEphemeralWithAudio(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
audio = audio,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithDocument(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
document: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<DocumentContent> = sendDocument(
chatId = chatId,
document = document,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithDocument(
chatId: EphemeralChatId,
document: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<DocumentContent> = replyToEphemeralWithDocument(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
document = document,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithVideo(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
video: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo(
chatId = chatId,
video = video,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithVideo(
chatId: EphemeralChatId,
video: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = replyToEphemeralWithVideo(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
video = video,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithAnimation(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
animation: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation(
chatId = chatId,
animation = animation,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithAnimation(
chatId: EphemeralChatId,
animation: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = replyToEphemeralWithAnimation(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
animation = animation,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithVoice(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
voice: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice(
chatId = chatId,
voice = voice,
text = text,
parseMode = parseMode,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithVoice(
chatId: EphemeralChatId,
voice: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = replyToEphemeralWithVoice(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
voice = voice,
text = text,
parseMode = parseMode,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithVideoNote(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
videoNote: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = sendVideoNote(
chatId = chatId,
videoNote = videoNote,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithVideoNote(
chatId: EphemeralChatId,
videoNote: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = replyToEphemeralWithVideoNote(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
videoNote = videoNote,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithSticker(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
sticker: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = sendSticker(
chatId = chatId,
sticker = sticker,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithSticker(
chatId: EphemeralChatId,
sticker: InputFile,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = replyToEphemeralWithSticker(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
sticker = sticker,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
/**
* Sends a static location (`live_period` is not supported for ephemeral messages, see [SendLocation.Live])
*/
public suspend fun TelegramBot.replyToEphemeralWithLocation(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
latitude: Double,
longitude: Double,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendStaticLocation(
chatId = chatId,
latitude = latitude,
longitude = longitude,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Sends a static location (`live_period` is not supported for ephemeral messages, see [SendLocation.Live]).
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithLocation(
chatId: EphemeralChatId,
latitude: Double,
longitude: Double,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = replyToEphemeralWithLocation(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
latitude = latitude,
longitude = longitude,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithVenue(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
latitude: Double,
longitude: Double,
title: String,
address: String,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = sendVenue(
chatId = chatId,
latitude = latitude,
longitude = longitude,
title = title,
address = address,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithVenue(
chatId: EphemeralChatId,
latitude: Double,
longitude: Double,
title: String,
address: String,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = replyToEphemeralWithVenue(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
latitude = latitude,
longitude = longitude,
title = title,
address = address,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)
public suspend fun TelegramBot.replyToEphemeralWithContact(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
phoneNumber: String,
firstName: String,
lastName: String? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = sendContact(
chatId = chatId,
phoneNumber = phoneNumber,
firstName = firstName,
lastName = lastName,
receiverUserId = receiverUserId,
replyParameters = ReplyParameters.Ephemeral(ephemeralMessageId, allowSendingWithoutReply),
replyMarkup = replyMarkup
)
/**
* Convenience overload sourcing `receiverUserId`/`ephemeralMessageId` from [chatId]. Throws
* [IllegalArgumentException] if [chatId] does not carry an ephemeralMessageId
*/
public suspend fun TelegramBot.replyToEphemeralWithContact(
chatId: EphemeralChatId,
phoneNumber: String,
firstName: String,
lastName: String? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = replyToEphemeralWithContact(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
phoneNumber = phoneNumber,
firstName = firstName,
lastName = lastName,
allowSendingWithoutReply = allowSendingWithoutReply,
replyMarkup = replyMarkup
)

View File

@@ -24,6 +24,8 @@ public suspend fun TelegramBot.sendContact(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -40,6 +42,8 @@ public suspend fun TelegramBot.sendContact(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -60,6 +64,8 @@ public suspend fun TelegramBot.sendContact(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -74,6 +80,8 @@ public suspend fun TelegramBot.sendContact(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -96,6 +104,8 @@ public suspend fun TelegramBot.sendContact(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -111,6 +121,8 @@ public suspend fun TelegramBot.sendContact(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -130,6 +142,8 @@ public suspend fun TelegramBot.sendContact(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -143,6 +157,8 @@ public suspend fun TelegramBot.sendContact(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -27,6 +27,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -46,6 +48,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -70,6 +74,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -88,6 +94,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -112,6 +120,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -130,6 +140,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -153,6 +165,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -171,6 +185,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -195,6 +211,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -213,6 +231,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -236,6 +256,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -254,6 +276,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -278,6 +302,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -296,6 +322,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -319,6 +347,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -337,6 +367,8 @@ public suspend fun TelegramBot.sendLiveLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -29,6 +29,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -45,6 +47,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -67,6 +71,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -82,6 +88,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -103,6 +111,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -118,6 +128,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -140,6 +152,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -155,6 +169,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -175,6 +191,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -190,6 +208,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -211,6 +231,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -226,6 +248,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -247,6 +271,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -262,6 +288,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -282,6 +310,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -296,6 +326,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -316,6 +348,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -331,6 +365,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -352,6 +388,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -367,6 +405,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -387,6 +427,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -401,6 +443,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -421,6 +465,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -436,6 +482,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -457,6 +505,8 @@ public suspend fun TelegramBot.sendMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -472,6 +522,8 @@ public suspend fun TelegramBot.sendMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -493,6 +545,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -507,6 +561,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -527,6 +583,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -542,6 +600,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -563,6 +623,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -578,6 +640,8 @@ public suspend fun TelegramBot.sendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -25,6 +25,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -40,6 +42,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -60,6 +64,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -74,6 +80,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -94,6 +102,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -108,6 +118,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -127,6 +139,8 @@ public suspend fun TelegramBot.sendLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -141,6 +155,8 @@ public suspend fun TelegramBot.sendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -161,6 +177,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -175,6 +193,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -194,6 +214,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -208,6 +230,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -228,6 +252,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -242,6 +268,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -261,6 +289,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -275,6 +305,8 @@ public suspend fun TelegramBot.sendStaticLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -31,6 +31,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -52,6 +54,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -79,6 +83,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -99,6 +105,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -124,6 +132,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -144,6 +154,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -169,6 +181,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -189,6 +203,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -208,6 +224,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -222,6 +240,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -242,6 +262,8 @@ public suspend fun TelegramBot.sendVenue(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -255,6 +277,8 @@ public suspend fun TelegramBot.sendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -71,6 +71,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -91,6 +93,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -118,6 +122,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -138,6 +144,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -164,6 +172,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -183,6 +193,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -209,6 +221,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -228,6 +242,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -251,6 +267,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -267,6 +285,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -290,6 +310,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -306,6 +328,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -328,6 +352,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -343,6 +369,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -365,6 +393,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -380,6 +410,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -402,6 +434,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -417,6 +451,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -437,6 +473,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -450,6 +488,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -472,6 +512,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -487,6 +529,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -507,6 +551,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -520,6 +566,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -652,6 +700,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -668,6 +718,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -691,6 +743,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -707,6 +761,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -729,6 +785,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -744,6 +802,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -766,6 +826,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -780,6 +842,8 @@ public suspend inline fun TelegramBot.send(
entities = entities,
threadId = threadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -991,6 +1055,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1005,6 +1071,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1025,6 +1093,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1038,6 +1108,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1059,6 +1131,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1073,6 +1147,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1093,6 +1169,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1106,6 +1184,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1128,6 +1208,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1143,6 +1225,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1165,6 +1249,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1180,6 +1266,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1201,6 +1289,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1215,6 +1305,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1235,6 +1327,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1250,6 +1344,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1271,6 +1367,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1286,6 +1384,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1308,6 +1408,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1322,6 +1424,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1474,6 +1578,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1489,6 +1595,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1510,6 +1618,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1525,6 +1635,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1549,6 +1661,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1566,6 +1680,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1750,6 +1866,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1767,6 +1885,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1791,6 +1911,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1808,6 +1930,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1832,6 +1956,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1849,6 +1975,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1872,6 +2000,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1888,6 +2018,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1911,6 +2043,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1927,6 +2061,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1950,6 +2086,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -1966,6 +2104,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -1989,6 +2129,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -2005,6 +2147,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3162,6 +3306,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -3176,6 +3322,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -3197,6 +3345,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -3211,6 +3361,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -3238,6 +3390,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3256,6 +3410,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3280,6 +3436,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3297,6 +3455,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3322,6 +3482,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3340,6 +3502,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3364,6 +3528,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3381,6 +3547,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3408,6 +3576,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3428,6 +3598,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3455,6 +3627,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3475,6 +3649,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3501,6 +3677,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3520,6 +3698,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3546,6 +3726,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3565,6 +3747,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3585,6 +3769,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3598,6 +3784,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3618,6 +3806,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3631,6 +3821,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3656,6 +3848,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3674,6 +3868,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3699,6 +3895,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3717,6 +3915,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3741,6 +3941,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3758,6 +3960,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3782,6 +3986,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3799,6 +4005,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3823,6 +4031,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3840,6 +4050,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3864,6 +4076,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3881,6 +4095,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3904,6 +4120,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3920,6 +4138,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3943,6 +4163,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3959,6 +4181,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -3979,6 +4203,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -3991,6 +4217,8 @@ public suspend fun TelegramBot.send(
videoNote = videoNote,
threadId = threadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -4012,6 +4240,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -4025,6 +4255,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -4047,6 +4279,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -4062,6 +4296,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -4084,6 +4320,8 @@ public suspend fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -4099,6 +4337,8 @@ public suspend fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -4120,6 +4360,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -4134,6 +4376,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -4155,6 +4399,8 @@ public suspend inline fun TelegramBot.send(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -4169,6 +4415,8 @@ public suspend inline fun TelegramBot.send(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -34,6 +34,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -56,6 +58,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -83,6 +87,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -104,6 +110,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -131,6 +139,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -152,6 +162,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -178,6 +190,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -198,6 +212,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -225,6 +241,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -246,6 +264,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -272,6 +292,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -292,6 +314,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -318,6 +342,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -338,6 +364,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -363,6 +391,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -382,6 +412,8 @@ public suspend fun TelegramBot.sendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -30,6 +30,8 @@ public suspend fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -50,6 +52,8 @@ public suspend fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -76,6 +80,8 @@ public suspend fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -95,6 +101,8 @@ public suspend fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -117,6 +125,8 @@ public suspend fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -136,6 +146,8 @@ public suspend fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -158,6 +170,8 @@ public suspend fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -174,6 +188,8 @@ public suspend fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -199,6 +215,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -218,6 +236,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -243,6 +263,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -261,6 +283,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -282,6 +306,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -300,6 +326,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -321,6 +349,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -336,6 +366,8 @@ public suspend inline fun TelegramBot.sendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -27,6 +27,8 @@ public suspend fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -45,6 +47,8 @@ public suspend fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -69,6 +73,8 @@ public suspend fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -86,6 +92,8 @@ public suspend fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -108,6 +116,8 @@ public suspend fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -125,6 +135,8 @@ public suspend fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -147,6 +159,8 @@ public suspend fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -163,6 +177,8 @@ public suspend fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -185,6 +201,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -202,6 +220,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -225,6 +245,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -241,6 +263,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -262,6 +286,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -278,6 +304,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -299,6 +327,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -314,6 +344,8 @@ public suspend inline fun TelegramBot.sendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -31,6 +31,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -50,6 +52,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -74,6 +78,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -92,6 +98,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -116,6 +124,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -134,6 +144,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -157,6 +169,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -174,6 +188,8 @@ public suspend fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -197,6 +213,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -215,6 +233,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -238,6 +258,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -255,6 +277,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -278,6 +302,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -295,6 +321,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -317,6 +345,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -333,6 +363,8 @@ public suspend inline fun TelegramBot.sendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -30,6 +30,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -48,6 +50,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -72,6 +76,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -89,6 +95,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -112,6 +120,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -129,6 +139,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -152,6 +164,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -169,6 +183,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -192,6 +208,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -209,6 +227,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -232,6 +252,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -249,6 +271,8 @@ public suspend fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -272,6 +296,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -289,6 +315,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -312,6 +340,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -328,6 +358,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -350,6 +382,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -366,6 +400,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -388,6 +424,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -404,6 +442,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -426,6 +466,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -442,6 +484,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -464,6 +508,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -480,6 +526,8 @@ public suspend inline fun TelegramBot.sendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -24,6 +24,8 @@ public suspend fun TelegramBot.sendSticker(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -39,6 +41,8 @@ public suspend fun TelegramBot.sendSticker(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -60,6 +64,8 @@ public suspend fun TelegramBot.sendSticker(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -74,6 +80,8 @@ public suspend fun TelegramBot.sendSticker(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -94,6 +102,8 @@ public suspend fun TelegramBot.sendSticker(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -108,6 +118,8 @@ public suspend fun TelegramBot.sendSticker(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -128,6 +140,8 @@ public suspend fun TelegramBot.sendSticker(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -142,6 +156,8 @@ public suspend fun TelegramBot.sendSticker(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,

View File

@@ -37,6 +37,8 @@ public suspend fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -62,6 +64,8 @@ public suspend fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -87,6 +91,8 @@ public suspend fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -111,6 +117,8 @@ public suspend fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -141,6 +149,8 @@ public suspend fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -165,6 +175,8 @@ public suspend fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -190,6 +202,8 @@ public suspend fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -208,6 +222,8 @@ public suspend fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -237,6 +253,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -261,6 +279,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -285,6 +305,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -308,6 +330,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -337,6 +361,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -360,6 +386,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -384,6 +412,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -401,6 +431,8 @@ public suspend inline fun TelegramBot.sendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -25,6 +25,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -42,6 +44,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -62,6 +66,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -78,6 +84,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -100,6 +108,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -116,6 +126,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -135,6 +147,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -148,6 +162,8 @@ public suspend fun TelegramBot.sendVideoNote(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -27,6 +27,8 @@ public suspend fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -44,6 +46,8 @@ public suspend fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -67,6 +71,8 @@ public suspend fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -83,6 +89,8 @@ public suspend fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -104,6 +112,8 @@ public suspend fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -120,6 +130,8 @@ public suspend fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -141,6 +153,8 @@ public suspend fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -156,6 +170,8 @@ public suspend fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -178,6 +194,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -193,6 +211,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
duration = duration,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -216,6 +236,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -231,6 +253,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -251,6 +275,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -266,6 +292,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -285,6 +313,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
receiverUserId: UserId? = chat.id.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -299,6 +329,8 @@ public suspend inline fun TelegramBot.sendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -83,6 +83,7 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
public fun getAllowedUpdates ()Ljava/util/List;
public fun getAsUpdateReceiver ()Lkotlin/jvm/functions/Function2;
public fun getBot ()Ldev/inmo/tgbotapi/bot/RequestsExecutor;
public fun getBotSubscriptionUpdatedUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getBusinessConnectionUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getBusinessMessageUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;

View File

@@ -166,6 +166,11 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/B
public static synthetic fun expectOne$default (Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitBotSubscriptionUpdatedKt {
public static final fun waitBotSubscriptionUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitBotSubscriptionUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitBusinessConnectionKt {
public static final fun waitBusinessConnection (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitBusinessConnection$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
@@ -658,6 +663,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitChecklistTasksDone$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommonEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommonEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommunityChatAdded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommunityChatAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommunityChatRemoved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommunityChatRemoved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitDeleteChatPhotoEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitDeleteChatPhotoEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitForumTopicClosed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -779,6 +788,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitChatSharedRequestEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommonEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommonEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommunityChatAddedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommunityChatAddedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitCommunityChatRemovedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitCommunityChatRemovedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitDeleteChatPhotoEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitDeleteChatPhotoEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitForumTopicClosedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -1024,6 +1037,11 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/Messag
public static final fun getMessageFilterForums ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BotSubscriptionUpdatedTriggersKt {
public static final fun onBotSubscriptionUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onBotSubscriptionUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggersKt {
public static final fun onBusinessConnection (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onBusinessConnection$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
@@ -1419,6 +1437,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onChecklistTasksDone$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onCommonEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onCommonEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onCommunityChatAdded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onCommunityChatAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onCommunityChatRemoved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onCommunityChatRemoved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onDeleteChatPhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onDeleteChatPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onForumTopicClosed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1870,6 +1892,12 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBotSubscriptionUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBotSubscriptionUpdatedMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/payments/BotSubscriptionUpdated;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

View File

@@ -0,0 +1,17 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.botSubscriptionUpdatedUpdateOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
import kotlinx.coroutines.flow.Flow
fun BehaviourContext.waitBotSubscriptionUpdated(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
): Flow<BotSubscriptionUpdated> = expectFlow(
initRequest,
errorFactory
) {
(it.botSubscriptionUpdatedUpdateOrNull() ?.data).let(::listOfNotNull)
}

View File

@@ -10,6 +10,8 @@ import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
import dev.inmo.tgbotapi.types.chat.ChatBackground
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
@@ -327,6 +329,16 @@ fun BehaviourContext.waitSuggestedPostRefunded(
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<SuggestedPostRefunded>(initRequest, errorFactory)
fun BehaviourContext.waitCommunityChatAdded(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<CommunityChatAdded>(initRequest, errorFactory)
fun BehaviourContext.waitCommunityChatRemoved(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<CommunityChatRemoved>(initRequest, errorFactory)
fun BehaviourContext.waitSuggestedPostDeclined(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -7,6 +7,8 @@ import dev.inmo.tgbotapi.extensions.utils.*
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
import dev.inmo.tgbotapi.types.chat.ChatBackground
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.*
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
@@ -251,3 +253,13 @@ fun BehaviourContext.waitUniqueGiftSentOrReceivedMessages(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEventsMessages<GiftSentOrReceivedEvent.UniqueGift>(initRequest, errorFactory)
fun BehaviourContext.waitCommunityChatAddedEventsMessages(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEventsMessages<CommunityChatAdded>(initRequest, errorFactory)
fun BehaviourContext.waitCommunityChatRemovedEventsMessages(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEventsMessages<CommunityChatRemoved>(initRequest, errorFactory)

View File

@@ -0,0 +1,34 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserBotSubscriptionUpdatedMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.botSubscriptionUpdatedUpdateOrNull
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
import dev.inmo.tgbotapi.types.update.abstracts.Update
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onBotSubscriptionUpdated(
initialFilter: SimpleFilter<BotSubscriptionUpdated>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BotSubscriptionUpdated, Update>? = null,
markerFactory: MarkerFactory<in BotSubscriptionUpdated, Any>? = ByUserBotSubscriptionUpdatedMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BotSubscriptionUpdated>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BotSubscriptionUpdated>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
(it.botSubscriptionUpdatedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
}

View File

@@ -15,6 +15,8 @@ import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
import dev.inmo.tgbotapi.types.chat.ChatBackground
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
@@ -1452,3 +1454,45 @@ fun <BC : BehaviourContext> BC.onSuggestedPostRefunded(
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onCommunityChatAdded(
initialFilter: SimpleFilter<ChatEventMessage<CommunityChatAdded>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<CommunityChatAdded>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<CommunityChatAdded>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<CommunityChatAdded>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<CommunityChatAdded>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onCommunityChatRemoved(
initialFilter: SimpleFilter<ChatEventMessage<CommunityChatRemoved>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<CommunityChatRemoved>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<CommunityChatRemoved>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<CommunityChatRemoved>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<CommunityChatRemoved>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)

View File

@@ -0,0 +1,7 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
import dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated
object ByUserBotSubscriptionUpdatedMarkerFactory : MarkerFactory<BotSubscriptionUpdated, Any> {
override suspend fun invoke(data: BotSubscriptionUpdated) = data.user
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
package dev.inmo.tgbotapi.abstracts.types
import dev.inmo.tgbotapi.types.EphemeralMessageId
import dev.inmo.tgbotapi.types.UserId
interface EphemeralMessageAction : ChatRequest {
val receiverUserId: UserId
val ephemeralMessageId: EphemeralMessageId
}

View File

@@ -0,0 +1,37 @@
package dev.inmo.tgbotapi.requests
import dev.inmo.tgbotapi.abstracts.types.EphemeralMessageAction
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer
@Serializable
data class DeleteEphemeralMessage(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId
) : SimpleRequest<Unit>, EphemeralMessageAction {
constructor(
chatId: EphemeralChatId
): this(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" }
)
override fun method(): String = "deleteEphemeralMessage"
override val resultDeserializer: DeserializationStrategy<Unit>
get() = UnitFromBooleanSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -0,0 +1,12 @@
package dev.inmo.tgbotapi.requests.edit.abstracts
import dev.inmo.tgbotapi.abstracts.types.EphemeralMessageAction
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.builtins.serializer
interface EditEphemeralMessage : SimpleRequest<Unit>, EphemeralMessageAction {
override val resultDeserializer: DeserializationStrategy<Unit>
get() = UnitFromBooleanSerializer
}

View File

@@ -0,0 +1,105 @@
package dev.inmo.tgbotapi.requests.edit.caption
import dev.inmo.tgbotapi.requests.edit.abstracts.*
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.parseModeField
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.*
import dev.inmo.tgbotapi.types.message.RawMessageEntity
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.*
const val editEphemeralMessageCaptionMethod = "editEphemeralMessageCaption"
fun EditEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageCaption(
chatId = chatId,
receiverUserId = receiverUserId,
ephemeralMessageId = ephemeralMessageId,
text = caption,
parseMode = parseMode,
rawEntities = null,
replyMarkup = replyMarkup
)
fun EditEphemeralMessageCaption(
chatId: EphemeralChatId,
caption: String? = null,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageCaption(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
caption = caption,
parseMode = parseMode,
replyMarkup = replyMarkup
)
fun EditEphemeralMessageCaption(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageCaption(
chatId = chatId,
receiverUserId = receiverUserId,
ephemeralMessageId = ephemeralMessageId,
text = entities.makeString(),
parseMode = null,
rawEntities = entities.toRawMessageEntities(),
replyMarkup = replyMarkup
)
fun EditEphemeralMessageCaption(
chatId: EphemeralChatId,
entities: TextSourcesList,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageCaption(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
entities = entities,
replyMarkup = replyMarkup
)
@ConsistentCopyVisibility
@Serializable
data class EditEphemeralMessageCaption internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(captionEntitiesField)
private val rawEntities: List<RawMessageEntity>? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditEphemeralMessage, EditTextChatMessage, EditReplyMessage {
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)
}
override fun method(): String = editEphemeralMessageCaptionMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -0,0 +1,51 @@
package dev.inmo.tgbotapi.requests.edit.media
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
import dev.inmo.tgbotapi.requests.edit.abstracts.*
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
const val editEphemeralMessageMediaMethod = "editEphemeralMessageMedia"
@Serializable
data class EditEphemeralMessageMedia(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@SerialName(mediaField)
override val media: TelegramFreeMedia,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditEphemeralMessage, EditReplyMessage, EditMediaMessage {
constructor(
chatId: EphemeralChatId,
media: TelegramFreeMedia,
replyMarkup: InlineKeyboardMarkup? = null
): this(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
media,
replyMarkup
)
init {
require(media.file !is MultipartFile) {
"For editing of ephemeral media messages you MUST use file id (uploading of a new file is not supported)"
}
}
override fun method(): String = editEphemeralMessageMediaMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -0,0 +1,39 @@
package dev.inmo.tgbotapi.requests.edit.reply_markup
import dev.inmo.tgbotapi.requests.edit.abstracts.EditEphemeralMessage
import dev.inmo.tgbotapi.requests.edit.abstracts.EditReplyMessage
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
const val editEphemeralMessageReplyMarkupMethod = "editEphemeralMessageReplyMarkup"
@Serializable
data class EditEphemeralMessageReplyMarkup(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditEphemeralMessage, EditReplyMessage {
constructor(
chatId: EphemeralChatId,
replyMarkup: InlineKeyboardMarkup? = null
): this(
chatId,
chatId.receiverUser,
requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
replyMarkup
)
override fun method(): String = editEphemeralMessageReplyMarkupMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -0,0 +1,122 @@
package dev.inmo.tgbotapi.requests.edit.text
import dev.inmo.tgbotapi.requests.edit.abstracts.*
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.parseModeField
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.message.*
import dev.inmo.tgbotapi.types.message.RawMessageEntity
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
import dev.inmo.tgbotapi.utils.extensions.makeString
import dev.inmo.tgbotapi.utils.throwRangeError
import kotlinx.serialization.*
const val editEphemeralMessageTextMethod = "editEphemeralMessageText"
fun EditEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageText(
chatId = chatId,
receiverUserId = receiverUserId,
ephemeralMessageId = ephemeralMessageId,
text = text,
parseMode = parseMode,
rawEntities = null,
linkPreviewOptions = linkPreviewOptions,
replyMarkup = replyMarkup
)
fun EditEphemeralMessageText(
chatId: EphemeralChatId,
text: String,
parseMode: ParseMode? = null,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageText(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
text = text,
parseMode = parseMode,
linkPreviewOptions = linkPreviewOptions,
replyMarkup = replyMarkup
)
fun EditEphemeralMessageText(
chatId: ChatIdentifier,
receiverUserId: UserId,
ephemeralMessageId: EphemeralMessageId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageText(
chatId = chatId,
receiverUserId = receiverUserId,
ephemeralMessageId = ephemeralMessageId,
text = entities.makeString(),
parseMode = null,
rawEntities = entities.toRawMessageEntities(),
linkPreviewOptions = linkPreviewOptions,
replyMarkup = replyMarkup
)
fun EditEphemeralMessageText(
chatId: EphemeralChatId,
entities: TextSourcesList,
linkPreviewOptions: LinkPreviewOptions? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = EditEphemeralMessageText(
chatId = chatId,
receiverUserId = chatId.receiverUser,
ephemeralMessageId = requireNotNull(chatId.ephemeralMessageId) { "chatId ($chatId) does not carry an ephemeralMessageId" },
entities = entities,
linkPreviewOptions = linkPreviewOptions,
replyMarkup = replyMarkup
)
@ConsistentCopyVisibility
@Serializable
data class EditEphemeralMessageText internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(receiverUserIdField)
@EncodeDefault
override val receiverUserId: UserId,
@OptIn(ExperimentalSerializationApi::class)
@SerialName(ephemeralMessageIdField)
@EncodeDefault
override val ephemeralMessageId: EphemeralMessageId,
@SerialName(textField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(entitiesField)
private val rawEntities: List<RawMessageEntity>? = null,
@SerialName(linkPreviewOptionsField)
override val linkPreviewOptions: LinkPreviewOptions? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditEphemeralMessage, EditTextChatMessage, EditReplyMessage, EditLinkPreviewOptionsContainer {
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text)
}
init {
if (text.length !in textLength) {
throwRangeError("Text length", textLength, text.length)
}
}
override fun method(): String = editEphemeralMessageTextMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.requests.send
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyEphemeralSendRequest
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
@@ -36,6 +37,10 @@ data class SendContact(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -51,7 +56,8 @@ data class SendContact(
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendContentMessageRequest<ChatContentMessage<ContactContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<ContactContent>>
ReplyingMarkupSendMessageRequest<ChatContentMessage<ContactContent>>,
OptionallyEphemeralSendRequest
{
constructor(
chatId: ChatIdentifier,
@@ -59,6 +65,8 @@ data class SendContact(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -74,6 +82,8 @@ data class SendContact(
threadId,
directMessageThreadId,
businessConnectionId,
receiverUserId,
callbackQueryId,
disableNotification,
protectContent,
allowPaidBroadcast,
@@ -95,6 +105,8 @@ fun Contact.toRequest(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -108,6 +120,8 @@ fun Contact.toRequest(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -34,6 +34,8 @@ fun SendLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -48,6 +50,8 @@ fun SendLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -64,6 +68,8 @@ fun SendStaticLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -78,6 +84,8 @@ fun SendStaticLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -87,6 +95,11 @@ fun SendStaticLocation(
replyMarkup = replyMarkup
)
/**
* @param livePeriod According to Telegram Bots API, must be `0` when sending as an ephemeral message (with
* [receiverUserId] set), as ephemeral messages do not support live location updates. Prefer [SendStaticLocation]
* for ephemeral locations.
*/
fun SendLiveLocation(
chatId: ChatIdentifier,
latitude: Double,
@@ -98,6 +111,8 @@ fun SendLiveLocation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -116,6 +131,8 @@ fun SendLiveLocation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -132,9 +149,15 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
HorizontallyAccured,
Livable,
ProximityAlertable,
Headed {
Headed,
OptionallyEphemeralSendRequest {
override fun method(): String = "sendLocation"
/**
* @property livePeriod According to Telegram Bots API, must be `0` when sending as an ephemeral message (with
* [receiverUserId] set), as ephemeral messages do not support live location updates. Prefer [Static]
* for ephemeral locations.
*/
@Serializable
data class Live (
@SerialName(chatIdField)
@@ -165,6 +188,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
@OptIn(ExperimentalSerializationApi::class)
@EncodeDefault
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -215,6 +242,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
@OptIn(ExperimentalSerializationApi::class)
@EncodeDefault
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -267,6 +298,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -297,6 +332,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
threadId = surrogate.threadId,
directMessageThreadId = surrogate.directMessageThreadId,
businessConnectionId = surrogate.businessConnectionId,
receiverUserId = surrogate.receiverUserId,
callbackQueryId = surrogate.callbackQueryId,
disableNotification = surrogate.disableNotification,
protectContent = surrogate.protectContent,
allowPaidBroadcast = surrogate.allowPaidBroadcast,
@@ -316,6 +353,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
threadId = surrogate.threadId,
directMessageThreadId = surrogate.directMessageThreadId,
businessConnectionId = surrogate.businessConnectionId,
receiverUserId = surrogate.receiverUserId,
callbackQueryId = surrogate.callbackQueryId,
disableNotification = surrogate.disableNotification,
protectContent = surrogate.protectContent,
allowPaidBroadcast = surrogate.allowPaidBroadcast,
@@ -340,6 +379,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -30,6 +30,8 @@ fun SendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -45,6 +47,8 @@ fun SendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
linkPreviewOptions = linkPreviewOptions,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -62,6 +66,8 @@ fun SendTextMessage(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -77,6 +83,8 @@ fun SendTextMessage(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
linkPreviewOptions = linkPreviewOptions,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -108,6 +116,10 @@ data class SendTextMessage internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(linkPreviewOptionsField)
override val linkPreviewOptions: LinkPreviewOptions? = null,
@SerialName(disableNotificationField)
@@ -127,7 +139,8 @@ data class SendTextMessage internal constructor(
) : SendContentMessageRequest<ChatContentMessage<TextContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<TextContent>>,
TextableSendMessageRequest<ChatContentMessage<TextContent>>,
LinkPreviewOptionsContainer
LinkPreviewOptionsContainer,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text)

View File

@@ -1,5 +1,8 @@
package dev.inmo.tgbotapi.requests.send
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
import dev.inmo.tgbotapi.requests.abstracts.MultipartRequest
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
import dev.inmo.tgbotapi.types.*
@@ -10,6 +13,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import dev.inmo.tgbotapi.types.message.content.RichMessageContent
import dev.inmo.tgbotapi.types.rich.InputRichMessage
import dev.inmo.tgbotapi.types.rich.multipartFiles
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.ExperimentalSerializationApi
@@ -56,10 +60,14 @@ data class SendRichMessage(
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendContentMessageRequest<ChatContentMessage<RichMessageContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<RichMessageContent>> {
ReplyingMarkupSendMessageRequest<ChatContentMessage<RichMessageContent>>,
MultipartRequest.Common<ChatContentMessage<RichMessageContent>> {
override fun method(): String = "sendRichMessage"
override val resultDeserializer: DeserializationStrategy<ChatContentMessage<RichMessageContent>>
get() = RichMessageContentMessageResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override val data: SimpleRequest<ChatContentMessage<RichMessageContent>>
get() = this
override val mediaMap: Map<String, MultipartFile> by lazy { richMessage.multipartFiles }
}

View File

@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.draftIdField
import dev.inmo.tgbotapi.types.messageThreadIdField
import dev.inmo.tgbotapi.types.richMessageField
import dev.inmo.tgbotapi.types.rich.InputRichMessage
import dev.inmo.tgbotapi.types.rich.multipartFiles
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerialName
@@ -39,6 +40,9 @@ data class SendRichMessageDraft(
require(draftId != 0L) {
"draftId of SendRichMessageDraft must be non-zero"
}
require(richMessage.multipartFiles.isEmpty()) {
"sendRichMessageDraft does not support direct upload of new files"
}
}
override val requestSerializer: SerializationStrategy<*>

View File

@@ -45,6 +45,10 @@ data class SendVenue(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -62,7 +66,8 @@ data class SendVenue(
) : SendContentMessageRequest<ChatContentMessage<VenueContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<VenueContent>>,
TitledSendMessageRequest<ChatContentMessage<VenueContent>>,
PositionedSendMessageRequest<ChatContentMessage<VenueContent>>
PositionedSendMessageRequest<ChatContentMessage<VenueContent>>,
OptionallyEphemeralSendRequest
{
constructor(
chatId: ChatIdentifier,
@@ -70,6 +75,8 @@ data class SendVenue(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -90,6 +97,8 @@ data class SendVenue(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -111,6 +120,8 @@ fun Venue.toRequest(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -124,6 +135,8 @@ fun Venue.toRequest(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,

View File

@@ -0,0 +1,13 @@
package dev.inmo.tgbotapi.requests.send.abstracts
import dev.inmo.tgbotapi.types.CallbackQueryId
import dev.inmo.tgbotapi.types.UserId
/**
* Inheritors of this interface may be sent as ephemeral messages (visible only to [receiverUserId] and the bot)
* by passing a non-null [receiverUserId]. Available for groups/supergroups only.
*/
interface OptionallyEphemeralSendRequest {
val receiverUserId: UserId?
val callbackQueryId: CallbackQueryId?
}

View File

@@ -38,6 +38,8 @@ fun SendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -64,6 +66,8 @@ fun SendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -96,6 +100,8 @@ fun SendAnimation(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -122,6 +128,8 @@ fun SendAnimation(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -179,6 +187,10 @@ data class SendAnimationData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -201,7 +213,8 @@ data class SendAnimationData internal constructor(
DuratedSendMessageRequest<ChatContentMessage<AnimationContent>>,
SizedSendMessageRequest<ChatContentMessage<AnimationContent>>,
WithCustomizableCaptionRequest<ChatContentMessage<AnimationContent>>,
OptionallyWithSpoilerRequest
OptionallyWithSpoilerRequest,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -37,6 +37,8 @@ fun SendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -61,6 +63,8 @@ fun SendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -91,6 +95,8 @@ fun SendAudio(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -115,6 +121,8 @@ fun SendAudio(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -168,6 +176,10 @@ data class SendAudioData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -189,7 +201,8 @@ data class SendAudioData internal constructor(
ThumbedSendMessageRequest<ChatContentMessage<AudioContent>>,
TitledSendMessageRequest<ChatContentMessage<AudioContent>>,
DuratedSendMessageRequest<ChatContentMessage<AudioContent>>,
Performerable
Performerable,
OptionallyEphemeralSendRequest
{
override val textSources: List<TextSource>? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -42,6 +42,8 @@ fun SendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -64,6 +66,8 @@ fun SendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -101,6 +105,8 @@ fun SendDocument(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -123,6 +129,8 @@ fun SendDocument(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -180,6 +188,10 @@ data class SendDocumentData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -200,7 +212,8 @@ data class SendDocumentData internal constructor(
SendContentMessageRequest<ChatContentMessage<DocumentContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<DocumentContent>>,
TextableSendMessageRequest<ChatContentMessage<DocumentContent>>,
ThumbedSendMessageRequest<ChatContentMessage<DocumentContent>>
ThumbedSendMessageRequest<ChatContentMessage<DocumentContent>>,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -35,6 +35,8 @@ fun SendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -58,6 +60,8 @@ fun SendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -87,6 +91,8 @@ fun SendLivePhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -110,6 +116,8 @@ fun SendLivePhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -161,6 +169,10 @@ data class SendLivePhotoData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -180,7 +192,8 @@ data class SendLivePhotoData internal constructor(
ReplyingMarkupSendMessageRequest<ChatContentMessage<LivePhotoContent>>,
TextableSendMessageRequest<ChatContentMessage<LivePhotoContent>>,
WithCustomizableCaptionRequest<ChatContentMessage<LivePhotoContent>>,
OptionallyWithSpoilerRequest
OptionallyWithSpoilerRequest,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -33,6 +33,8 @@ fun SendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -52,6 +54,8 @@ fun SendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -79,6 +83,8 @@ fun SendPhoto(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -98,6 +104,8 @@ fun SendPhoto(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -147,6 +155,10 @@ data class SendPhotoData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -166,7 +178,8 @@ data class SendPhotoData internal constructor(
ReplyingMarkupSendMessageRequest<ChatContentMessage<PhotoContent>>,
TextableSendMessageRequest<ChatContentMessage<PhotoContent>>,
WithCustomizableCaptionRequest<ChatContentMessage<PhotoContent>>,
OptionallyWithSpoilerRequest
OptionallyWithSpoilerRequest,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.requests.send.media
import dev.inmo.tgbotapi.requests.abstracts.*
import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyEphemeralSendRequest
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
@@ -22,6 +23,8 @@ fun SendSticker(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
emoji: String? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -36,6 +39,8 @@ fun SendSticker(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
emoji = emoji,
disableNotification = disableNotification,
protectContent = protectContent,
@@ -74,6 +79,10 @@ data class SendStickerByFileId internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(emojiField)
val emoji: String? = null,
@SerialName(disableNotificationField)
@@ -90,7 +99,7 @@ data class SendStickerByFileId internal constructor(
override val replyParameters: ReplyParameters? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendContentMessageRequest<ChatContentMessage<StickerContent>>, ReplyingMarkupSendMessageRequest<ChatContentMessage<StickerContent>> {
) : SendContentMessageRequest<ChatContentMessage<StickerContent>>, ReplyingMarkupSendMessageRequest<ChatContentMessage<StickerContent>>, OptionallyEphemeralSendRequest {
override fun method(): String = "sendSticker"
override val resultDeserializer: DeserializationStrategy<ChatContentMessage<StickerContent>>
get() = commonResultDeserializer

View File

@@ -43,6 +43,8 @@ fun SendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -73,6 +75,8 @@ fun SendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -108,6 +112,8 @@ fun SendVideo(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -138,6 +144,8 @@ fun SendVideo(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -201,6 +209,10 @@ data class SendVideoData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -226,7 +238,8 @@ data class SendVideoData internal constructor(
CoveredSendMessageRequest<ChatContentMessage<VideoContent>>,
WithCustomStartMediaData,
OptionallyWithSpoilerRequest,
OptionallyStreamable
OptionallyStreamable,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -25,6 +25,8 @@ fun SendVideoNote(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -45,6 +47,8 @@ fun SendVideoNote(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -90,6 +94,10 @@ data class SendVideoNoteData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -109,7 +117,8 @@ data class SendVideoNoteData internal constructor(
ReplyingMarkupSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
ThumbedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
DuratedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
SizedSendMessageRequest<ChatContentMessage<VideoNoteContent>>
SizedSendMessageRequest<ChatContentMessage<VideoNoteContent>>,
OptionallyEphemeralSendRequest
{
override val height: Int?
get() = width

View File

@@ -31,6 +31,8 @@ fun SendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
@@ -51,6 +53,8 @@ fun SendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -77,6 +81,8 @@ fun SendVoice(
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
receiverUserId: UserId? = chatId.receiverUser,
callbackQueryId: CallbackQueryId? = null,
duration: Long? = null,
disableNotification: Boolean = false,
protectContent: Boolean = false,
@@ -98,6 +104,8 @@ fun SendVoice(
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
receiverUserId = receiverUserId,
callbackQueryId = callbackQueryId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
@@ -145,6 +153,10 @@ data class SendVoiceData internal constructor(
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@SerialName(businessConnectionIdField)
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@SerialName(receiverUserIdField)
override val receiverUserId: UserId? = chatId.receiverUser,
@SerialName(callbackQueryIdField)
override val callbackQueryId: CallbackQueryId? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(protectContentField)
@@ -163,7 +175,8 @@ data class SendVoiceData internal constructor(
SendContentMessageRequest<ChatContentMessage<VoiceContent>>,
ReplyingMarkupSendMessageRequest<ChatContentMessage<VoiceContent>>,
TextableSendMessageRequest<ChatContentMessage<VoiceContent>>,
DuratedSendMessageRequest<ChatContentMessage<VoiceContent>>
DuratedSendMessageRequest<ChatContentMessage<VoiceContent>>,
OptionallyEphemeralSendRequest
{
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)

View File

@@ -14,7 +14,9 @@ data class BotCommand(
@SerialName(botCommandField)
val command: String,
@SerialName(descriptionField)
val description: String
val description: String,
@SerialName(isEphemeralField)
val isEphemeral: Boolean = false
) {
init {
if (command.length !in botCommandLengthLimit) {

View File

@@ -39,6 +39,10 @@ sealed interface IdChatIdentifier : ChatIdentifier {
get() = null
val directMessageThreadId: DirectMessageThreadId?
get() = null
val receiverUser: UserId?
get() = null
val ephemeralMessageId: EphemeralMessageId?
get() = null
companion object {
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId? = null, businessConnectionId: BusinessConnectionId? = null) = threadId ?.let {
@@ -48,6 +52,7 @@ sealed interface IdChatIdentifier : ChatIdentifier {
} ?: ChatId(chatId)
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId) = ChatIdWithThreadId(chatId, threadId)
operator fun invoke(chatId: RawChatId, businessConnectionId: BusinessConnectionId) = BusinessChatId(chatId, businessConnectionId)
operator fun invoke(chatId: RawChatId, receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null) = EphemeralChatId(chatId, receiverUser, ephemeralMessageId)
}
}
@@ -91,6 +96,26 @@ value class BusinessChatId(val chatIdWithBusinessConnectionId: Pair<RawChatId, B
constructor(chatId: RawChatId, businessConnectionId: BusinessConnectionId): this(chatId to businessConnectionId)
}
/**
* Chat id of group/supergroup additionally carrying ephemeral [receiverUser] (and optional [ephemeralMessageId]);
* used to default `receiverUserId`/`ephemeralMessageId` params of ephemeral-related requests
*/
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(ChatIdentifierSerializer::class)
@JvmInline
value class EphemeralChatId(
val chatIdWithReceiverUserAndEphemeralMessageId: Triple<RawChatId, UserId, EphemeralMessageId?>
) : IdChatIdentifier {
override val chatId: RawChatId
get() = chatIdWithReceiverUserAndEphemeralMessageId.first
override val receiverUser: UserId
get() = chatIdWithReceiverUserAndEphemeralMessageId.second
override val ephemeralMessageId: EphemeralMessageId?
get() = chatIdWithReceiverUserAndEphemeralMessageId.third
constructor(chatId: RawChatId, receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null): this(Triple(chatId, receiverUser, ephemeralMessageId))
}
val ChatIdentifier.threadId: MessageThreadId?
get() = (this as? IdChatIdentifier) ?.threadId
@@ -100,16 +125,24 @@ val ChatIdentifier.directMessageThreadId: DirectMessageThreadId?
val ChatIdentifier.businessConnectionId: BusinessConnectionId?
get() = (this as? IdChatIdentifier) ?.businessConnectionId
val ChatIdentifier.receiverUser: UserId?
get() = (this as? IdChatIdentifier) ?.receiverUser
val ChatIdentifier.ephemeralMessageId: EphemeralMessageId?
get() = (this as? IdChatIdentifier) ?.ephemeralMessageId
fun IdChatIdentifier.toChatId() = when (this) {
is ChatId -> this
is ChatIdWithThreadId -> ChatId(chatId)
is ChatIdWithChannelDirectMessageThreadId -> ChatId(chatId)
is BusinessChatId -> ChatId(chatId)
is EphemeralChatId -> ChatId(chatId)
}
fun IdChatIdentifier.toChatWithThreadId(threadId: MessageThreadId) = IdChatIdentifier(chatId, threadId)
fun IdChatIdentifier.toChatIdWithChannelDirectMessageThreadId(threadId: DirectMessageThreadId) = ChatIdWithChannelDirectMessageThreadId(chatId, threadId)
fun IdChatIdentifier.toBusinessChatId(businessConnectionId: BusinessConnectionId) = IdChatIdentifier(chatId, businessConnectionId)
fun IdChatIdentifier.toEphemeralChatId(receiverUser: UserId, ephemeralMessageId: EphemeralMessageId? = null) = IdChatIdentifier(chatId, receiverUser, ephemeralMessageId)
/**
* https://core.telegram.org/bots/api#formatting-options
@@ -256,6 +289,17 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
)
}
}
4 -> {
val (chatId, intermediateDelimiter, receiverUserChatId, ephemeralMessageId) = splitted
when (intermediateDelimiter) {
"eph" -> EphemeralChatId(
chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
receiverUserChatId.toLongOrNull() ?.let { ChatId(RawChatId(it)) } ?: return@let null,
ephemeralMessageId.toLongOrNull() ?.let(::EphemeralMessageId)
)
else -> null
}
}
else -> null
}
} ?: id.content.let {
@@ -269,6 +313,7 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}")
is BusinessChatId -> encoder.encodeString("${value.chatId}//${value.businessConnectionId}")
is ChatIdWithChannelDirectMessageThreadId -> encoder.encodeString("${value.chatId}/cdm/${value.directMessageThreadId}")
is EphemeralChatId -> encoder.encodeString("${value.chatId}/eph/${value.receiverUser.chatId}/${value.ephemeralMessageId?.long ?: ""}")
is Username -> encoder.encodeString(value.full)
}
}

View File

@@ -466,6 +466,7 @@ const val botCommandField = "command"
const val botCommandFullField = "bot_command"
const val botCommandsField = "commands"
const val scopeField = "scope"
const val isEphemeralField = "is_ephemeral"
const val isMemberField = "is_member"
const val isForumField = "is_forum"
@@ -756,6 +757,9 @@ const val mainFrameTimestampField = "main_frame_timestamp"
const val firstProfileAudioField = "first_profile_audio"
const val paidMessageStarCountField = "paid_message_star_count"
const val senderTagField = "sender_tag"
const val receiverUserField = "receiver_user"
const val receiverUserIdField = "receiver_user_id"
const val ephemeralMessageIdField = "ephemeral_message_id"
const val countField = "count"
const val ratingField = "rating"
const val uniqueGiftColorsField = "unique_gift_colors"
@@ -942,4 +946,6 @@ const val temperatureField = "temperature"
const val backgroundColorField = "background_color"
const val keepOriginalDetailsField = "keep_original_details"
const val communityField = "community"
const val codecField = "codec"

View File

@@ -0,0 +1,16 @@
package dev.inmo.tgbotapi.types
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class EphemeralMessageId(
val long: Long
) {
override fun toString(): String {
return long.toString()
}
}
fun Long.asEphemeralMessageId() = EphemeralMessageId(this)

View File

@@ -2,195 +2,351 @@ package dev.inmo.tgbotapi.types
import dev.inmo.tgbotapi.abstracts.TextedInput
import dev.inmo.tgbotapi.abstracts.WithMessageId
import dev.inmo.tgbotapi.types.chat.Bot
import dev.inmo.tgbotapi.types.chat.PreviewBot
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
import dev.inmo.tgbotapi.types.polls.PollOptionPersistentId
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.RawMessageEntity
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEphemeralMessage
import dev.inmo.tgbotapi.types.message.asTextSources
import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
import dev.inmo.tgbotapi.types.polls.PollOptionPersistentId
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationException
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
@ConsistentCopyVisibility
@Serializable
data class ReplyParameters internal constructor(
@SerialName(chatIdField)
val chatIdentifier: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageId,
@SerialName(allowSendingWithoutReplyField)
val allowSendingWithoutReply: Boolean? = null,
@SerialName(quoteField)
val quote: String? = null,
@SerialName(quoteParseModeField)
val quoteParseMode: ParseMode? = null,
@SerialName(quoteEntitiesField)
private val quoteEntities: List<RawMessageEntity>? = null,
@SerialName(quotePositionField)
val quotePosition: Int? = null,
@SerialName(checklistTaskIdField)
val checklistTaskId: ChecklistTaskId? = null,
@SerialName(pollOptionIdField)
val pollOptionId: PollOptionPersistentId? = null,
) : WithMessageId, TextedInput {
override val text: String?
get() = quote
override val textSources: List<TextSource> by lazy {
quoteEntities ?.asTextSources(quote ?: return@lazy emptyList()) ?: emptyList()
@Serializable(ReplyParameters.Serializer::class)
sealed interface ReplyParameters {
val messageId: MessageId?
val allowSendingWithoutReply: Boolean?
val checklistTaskId: ChecklistTaskId?
val pollOptionId: PollOptionPersistentId?
/**
* Reply parameters targeting a regular message identified by [messageId]. A `null` [chatIdentifier] targets a
* message in the current chat; a non-null [chatIdentifier] targets a message in a different chat. Public
* construction uses the `ReplyParameters(...)` companion factories.
*/
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@ConsistentCopyVisibility
@Serializable(ReplyParameters.Serializer::class)
data class Chat internal constructor(
val chatIdentifier: ChatIdentifier?,
override val messageId: MessageId,
override val allowSendingWithoutReply: Boolean? = null,
val quote: String? = null,
val quoteParseMode: ParseMode? = null,
internal val quoteEntities: List<RawMessageEntity>? = null,
val quotePosition: Int? = null,
override val checklistTaskId: ChecklistTaskId? = null,
override val pollOptionId: PollOptionPersistentId? = null,
) : WithMessageId, ReplyParameters, TextedInput {
override val text: String?
get() = quote
override val textSources: List<TextSource> by lazy {
quoteEntities ?.asTextSources(quote ?: return@lazy emptyList()) ?: emptyList()
}
}
constructor(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
chatIdentifier,
messageId,
allowSendingWithoutReply,
entities.makeSourceString(),
null,
entities.toRawMessageEntities(),
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
metaInfo: Message.MetaInfo,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
metaInfo.chatId,
metaInfo.messageId,
entities,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
message: Message,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
message.metaInfo,
entities,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
chatIdentifier,
messageId,
allowSendingWithoutReply,
quote,
quoteParseMode,
null,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
metaInfo: Message.MetaInfo,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
metaInfo.chatId,
metaInfo.messageId,
quote,
quoteParseMode,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
message: Message,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
message.metaInfo,
quote,
quoteParseMode,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
chatIdentifier,
messageId,
allowSendingWithoutReply,
null,
null,
null,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
metaInfo: Message.MetaInfo,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
metaInfo.chatId,
metaInfo.messageId,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
constructor(
message: Message,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
) : this(
message.metaInfo,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(ReplyParameters.Serializer::class)
/**
* Reply parameters targeting an incoming ephemeral message identified by [ephemeralMessageId]. The outgoing
* reply must also be ephemeral; chat and quote fields are unsupported for ephemeral replies. Type-neutral
* construction is available through the `ReplyParameters(...)` companion factory.
*/
data class Ephemeral(
val ephemeralMessageId: EphemeralMessageId,
override val allowSendingWithoutReply: Boolean? = null,
override val checklistTaskId: ChecklistTaskId? = null,
override val pollOptionId: PollOptionPersistentId? = null,
) : ReplyParameters {
override val messageId: MessageId? = null
}
companion object {
operator fun invoke(
ephemeralMessageId: EphemeralMessageId,
allowSendingWithoutReply: Boolean? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Ephemeral = Ephemeral(
ephemeralMessageId,
allowSendingWithoutReply,
checklistTaskId,
pollOptionId
)
operator fun invoke(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = Chat(
chatIdentifier,
messageId,
allowSendingWithoutReply,
entities.makeSourceString(),
null,
entities.toRawMessageEntities(),
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
metaInfo: Message.MetaInfo,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
metaInfo.chatId,
metaInfo.messageId,
entities,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
message: Message,
entities: TextSourcesList,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
message.metaInfo,
entities,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = Chat(
chatIdentifier,
messageId,
allowSendingWithoutReply,
quote,
quoteParseMode,
null,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
metaInfo: Message.MetaInfo,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
metaInfo.chatId,
metaInfo.messageId,
quote,
quoteParseMode,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
message: Message,
quote: String,
quoteParseMode: ParseMode,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
message.metaInfo,
quote,
quoteParseMode,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
chatIdentifier: ChatIdentifier,
messageId: MessageId,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = Chat(
chatIdentifier,
messageId,
allowSendingWithoutReply,
null,
null,
null,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
metaInfo: Message.MetaInfo,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
metaInfo.chatId,
metaInfo.messageId,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
operator fun invoke(
message: Message,
allowSendingWithoutReply: Boolean? = null,
quotePosition: Int? = null,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): Chat = invoke(
message.metaInfo,
allowSendingWithoutReply,
quotePosition,
checklistTaskId,
pollOptionId
)
}
object Serializer : KSerializer<ReplyParameters> {
@Serializable
private data class Surrogate(
@SerialName(chatIdField) val chatIdentifier: ChatIdentifier? = null,
@SerialName(messageIdField) val messageId: MessageId? = null,
@SerialName(allowSendingWithoutReplyField) val allowSendingWithoutReply: Boolean? = null,
@SerialName(quoteField) val quote: String? = null,
@SerialName(quoteParseModeField) val quoteParseMode: ParseMode? = null,
@SerialName(quoteEntitiesField) val quoteEntities: List<RawMessageEntity>? = null,
@SerialName(quotePositionField) val quotePosition: Int? = null,
@SerialName(checklistTaskIdField) val checklistTaskId: ChecklistTaskId? = null,
@SerialName(pollOptionIdField) val pollOptionId: PollOptionPersistentId? = null,
@SerialName(ephemeralMessageIdField) val ephemeralMessageId: EphemeralMessageId? = null,
)
override val descriptor: SerialDescriptor = Surrogate.serializer().descriptor
override fun deserialize(decoder: Decoder): ReplyParameters {
val surrogate = decoder.decodeSerializableValue(Surrogate.serializer())
if (surrogate.messageId != null && surrogate.ephemeralMessageId != null) {
throw SerializationException("ReplyParameters must contain either message_id or ephemeral_message_id, not both")
}
return when {
surrogate.ephemeralMessageId != null -> Ephemeral(
ephemeralMessageId = surrogate.ephemeralMessageId,
allowSendingWithoutReply = surrogate.allowSendingWithoutReply,
checklistTaskId = surrogate.checklistTaskId,
pollOptionId = surrogate.pollOptionId
)
surrogate.messageId != null -> Chat(
chatIdentifier = surrogate.chatIdentifier,
messageId = surrogate.messageId,
allowSendingWithoutReply = surrogate.allowSendingWithoutReply,
quote = surrogate.quote,
quoteParseMode = surrogate.quoteParseMode,
quoteEntities = surrogate.quoteEntities,
quotePosition = surrogate.quotePosition,
checklistTaskId = surrogate.checklistTaskId,
pollOptionId = surrogate.pollOptionId
)
else -> throw SerializationException("ReplyParameters must contain message_id or ephemeral_message_id")
}
}
override fun serialize(encoder: Encoder, value: ReplyParameters) {
val surrogate = when (value) {
is Chat -> Surrogate(
chatIdentifier = value.chatIdentifier,
messageId = value.messageId,
allowSendingWithoutReply = value.allowSendingWithoutReply,
quote = value.quote,
quoteParseMode = value.quoteParseMode,
quoteEntities = value.quoteEntities,
quotePosition = value.quotePosition,
checklistTaskId = value.checklistTaskId,
pollOptionId = value.pollOptionId
)
is Ephemeral -> Surrogate(
allowSendingWithoutReply = value.allowSendingWithoutReply,
ephemeralMessageId = value.ephemeralMessageId,
checklistTaskId = value.checklistTaskId,
pollOptionId = value.pollOptionId
)
}
encoder.encodeSerializableValue(Surrogate.serializer(), surrogate)
}
}
}
/**
* Builds [ReplyParameters.Ephemeral] with [allowSendingWithoutReply], [checklistTaskId], and [pollOptionId], targeting
* [ephemeralMessageId]. The target defaults to [PossiblyEphemeralMessage.ephemeralMessageId]; a missing target produces
* `null`.
*/
fun Message.ephemeralReplyParametersOrNull(
allowSendingWithoutReply: Boolean? = null,
ephemeralMessageId: EphemeralMessageId? = (this as? PossiblyEphemeralMessage) ?.ephemeralMessageId,
checklistTaskId: ChecklistTaskId? = null,
pollOptionId: PollOptionPersistentId? = null,
): ReplyParameters? =
ephemeralMessageId ?.let {
ReplyParameters(
ephemeralMessageId = it,
allowSendingWithoutReply = allowSendingWithoutReply,
checklistTaskId = checklistTaskId,
pollOptionId = pollOptionId,
)
}
/**
* Returns the receiver [UserId] for an ephemeral reply: [PossiblyEphemeralMessage.receiverUser] when available,
* otherwise [OptionallyFromUserMessage.from]; returns `null` for a non-ephemeral message.
*/
val Message.ephemeralReplyReceiverUserIdOrNull: UserId?
get() = (this as? PossiblyEphemeralMessage) ?.takeIf { it.ephemeralMessageId != null } ?.let {
val receiverUser = it.receiverUser
val thisAsOptionallyFromUserMessage = this as? OptionallyFromUserMessage
val from = thisAsOptionallyFromUserMessage ?.from
when {
receiverUser != null && receiverUser !is PreviewBot && from !is Bot -> receiverUser.id
from != null && from !is PreviewBot && from !is Bot -> from.id
else -> null
}
}

View File

@@ -28,6 +28,8 @@ const val UPDATE_GUEST_MESSAGE = "guest_message"
const val UPDATE_MANAGED_BOT = "managed_bot"
const val UPDATE_SUBSCRIPTION = "subscription"
val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
UPDATE_MESSAGE,
UPDATE_EDITED_MESSAGE,
@@ -65,6 +67,8 @@ val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
UPDATE_REMOVE_CHAT_BOOST,
UPDATE_MANAGED_BOT,
UPDATE_SUBSCRIPTION,
)
val ALL_UPDATES_LIST = ALL_UPDATES_LIST_WITHOUT_REACTIONS + listOf(

View File

@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
import dev.inmo.tgbotapi.types.colors.ColorId
import dev.inmo.tgbotapi.types.communities.Community
import dev.inmo.tgbotapi.types.files.AudioFile
import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes
import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftColors
@@ -71,7 +72,9 @@ data class ExtendedChannelChatImpl(
@SerialName(uniqueGiftColorsField)
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(guardBotField)
override val guardBot: User? = null
override val guardBot: User? = null,
@SerialName(communityField)
override val community: Community? = null
) : ExtendedChannelChat
@Serializable
@@ -120,7 +123,9 @@ data class ExtendedGroupChatImpl(
@SerialName(uniqueGiftColorsField)
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(guardBotField)
override val guardBot: User? = null
override val guardBot: User? = null,
@SerialName(communityField)
override val community: Community? = null
) : ExtendedGroupChat
@Serializable
@@ -322,7 +327,9 @@ data class ExtendedSupergroupChatImpl(
@SerialName(uniqueGiftColorsField)
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(guardBotField)
override val guardBot: User? = null
override val guardBot: User? = null,
@SerialName(communityField)
override val community: Community? = null
) : ExtendedSupergroupChat
@Serializable
@@ -398,7 +405,9 @@ data class ExtendedForumChatImpl(
@SerialName(uniqueGiftColorsField)
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(guardBotField)
override val guardBot: User? = null
override val guardBot: User? = null,
@SerialName(communityField)
override val community: Community? = null
) : ExtendedForumChat
@Serializable
@@ -477,7 +486,9 @@ data class ExtendedChannelDirectMessagesChatImpl(
@SerialName(uniqueGiftColorsField)
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(guardBotField)
override val guardBot: User? = null
override val guardBot: User? = null,
@SerialName(communityField)
override val community: Community? = null
) : ExtendedChannelDirectMessagesChat {
@OptIn(ExperimentalSerializationApi::class)
@SerialName(isDirectMessagesField)
@@ -533,6 +544,8 @@ data class ExtendedBot(
override val uniqueGiftColors: UniqueGiftColors? = null,
@SerialName(canManageBotsField)
val canManageBots: Boolean = false,
@SerialName(communityField)
override val community: Community? = null,
) : Bot(), ExtendedChat {
@SerialName(isBotField)
private val isBot = true

View File

@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro
import dev.inmo.tgbotapi.types.business_connection.BusinessLocation
import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours
import dev.inmo.tgbotapi.types.colors.ColorId
import dev.inmo.tgbotapi.types.communities.Community
import dev.inmo.tgbotapi.types.files.AudioFile
import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes
import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftColors
@@ -35,6 +36,14 @@ sealed interface ExtendedChat : Chat {
val guardBot: User?
get() = null
/**
* The Community to which the chat belongs
*
* @see <a href="https://core.telegram.org/bots/api#chatfullinfo">ChatFullInfo.community</a>
*/
val community: Community?
get() = null
@Deprecated(
message = "Telegram Bot API v9.0 introduced the new field, `acceptedGiftTypes`, to allow granular" +
" control over which types of gifts user, bot, or chat can accept.",

View File

@@ -0,0 +1,17 @@
package dev.inmo.tgbotapi.types.communities
import dev.inmo.tgbotapi.types.idField
import dev.inmo.tgbotapi.types.nameField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* Represents a community (a group of chats)
*/
@Serializable
data class Community(
@SerialName(idField)
val id: CommunityId,
@SerialName(nameField)
val name: String
)

View File

@@ -0,0 +1,15 @@
package dev.inmo.tgbotapi.types.communities
import dev.inmo.tgbotapi.types.communityField
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* Service message about a chat being added to a community
*/
@Serializable
data class CommunityChatAdded(
@SerialName(communityField)
val community: Community
) : CommonEvent

View File

@@ -0,0 +1,10 @@
package dev.inmo.tgbotapi.types.communities
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
import kotlinx.serialization.Serializable
/**
* Service message about a chat being removed from a community. Currently holds no information
*/
@Serializable
object CommunityChatRemoved : CommonEvent

View File

@@ -0,0 +1,14 @@
package dev.inmo.tgbotapi.types.communities
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmInline
@Serializable
@JvmInline
value class CommunityId(
val long: Long
) {
override fun toString(): String {
return long.toString()
}
}

View File

@@ -0,0 +1,7 @@
package dev.inmo.tgbotapi.types.media
import kotlinx.serialization.Serializable
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@Serializable(TelegramMediaSerializer::class)
sealed interface RichMessageMemberTelegramMedia : TelegramMedia

View File

@@ -67,7 +67,7 @@ data class TelegramMediaAnimation internal constructor(
override val height: Int? = null,
override val duration: Long? = null,
override val thumb: InputFile? = null
) : TelegramFreeMedia, SizedTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TextedOutput, SpoilerableTelegramMedia, WithCustomizableCaptionTelegramMedia, InputPollMedia, InputPollOptionMedia {
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, SizedTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TextedOutput, SpoilerableTelegramMedia, WithCustomizableCaptionTelegramMedia, InputPollMedia, InputPollOptionMedia {
@EncodeDefault
override val type: String = TYPE
override val textSources: TextSourcesList? by lazy {

View File

@@ -51,7 +51,7 @@ data class TelegramMediaAudio internal constructor(
override val performer: String? = null,
override val title: String? = null,
override val thumb: InputFile? = null
) : TelegramFreeMedia, AudioMediaGroupMemberTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TitledTelegramMedia,
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, AudioMediaGroupMemberTelegramMedia, DuratedTelegramMedia, ThumbedTelegramMedia, TitledTelegramMedia,
Performerable, InputPollMedia {
@EncodeDefault
override val type: String = TYPE

View File

@@ -44,7 +44,7 @@ data class TelegramMediaPhoto internal constructor(
override val spoilered: Boolean = false,
@SerialName(showCaptionAboveMediaField)
override val showCaptionAboveMedia: Boolean = false,
) : TelegramFreeMedia, VisualMediaGroupMemberTelegramMedia, InputPollMedia, InputPollOptionMedia {
) : TelegramFreeMedia, RichMessageMemberTelegramMedia, VisualMediaGroupMemberTelegramMedia, InputPollMedia, InputPollOptionMedia {
@EncodeDefault
override val type: String = TYPE
override val textSources: TextSourcesList? by lazy {

View File

@@ -25,6 +25,7 @@ object TelegramMediaSerializer : KSerializer<TelegramMedia> {
is TelegramPaidMediaPhoto -> TelegramPaidMediaPhoto.serializer().serialize(encoder, value)
is TelegramPaidMediaLivePhoto -> TelegramPaidMediaLivePhoto.serializer().serialize(encoder, value)
is TelegramMediaSticker -> TelegramMediaSticker.serializer().serialize(encoder, value)
is TelegramMediaVoiceNote -> TelegramMediaVoiceNote.serializer().serialize(encoder, value)
}
}

View File

@@ -92,6 +92,7 @@ data class TelegramMediaVideo internal constructor (
@SerialName(supportsStreamingField)
override val supportsStreaming: Boolean = false,
) : TelegramFreeMedia,
RichMessageMemberTelegramMedia,
SizedTelegramMedia,
DuratedTelegramMedia,
ThumbedTelegramMedia,

View File

@@ -0,0 +1,79 @@
package dev.inmo.tgbotapi.types.media
import dev.inmo.tgbotapi.abstracts.TextedOutput
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.abstracts.fileIdToSend
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.parseModeField
import dev.inmo.tgbotapi.types.files.VoiceFile
import dev.inmo.tgbotapi.types.message.*
import dev.inmo.tgbotapi.types.message.RawMessageEntity
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
fun TelegramMediaVoiceNote(
file: InputFile,
entities: TextSourcesList,
duration: Long? = null
) = TelegramMediaVoiceNote(
file, entities.makeString(), null, entities.toRawMessageEntities(), duration
)
fun TelegramMediaVoiceNote(
file: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null
) = TelegramMediaVoiceNote(
file, text, parseMode, null, duration
)
@ConsistentCopyVisibility
@Serializable
data class TelegramMediaVoiceNote internal constructor(
override val file: InputFile,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(captionEntitiesField)
private val rawEntities: List<RawMessageEntity>? = null,
override val duration: Long? = null
) : RichMessageMemberTelegramMedia, DuratedTelegramMedia, TextedOutput {
@EncodeDefault
override val type: String = TYPE
override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text ?: return@lazy null)
}
@SerialName(mediaField)
override val media: String
init { media = file.fileIdToSend } // crutch until js compiling will be fixed
companion object {
const val TYPE = "voice_note"
}
}
fun VoiceFile.toTelegramMediaVoiceNote(
text: String? = null,
parseMode: ParseMode? = null
): TelegramMediaVoiceNote = TelegramMediaVoiceNote(
fileId,
text,
parseMode,
duration
)
fun VoiceFile.toTelegramMediaVoiceNote(
textSources: TextSourcesList = emptyList()
): TelegramMediaVoiceNote = TelegramMediaVoiceNote(
fileId,
textSources,
duration
)

View File

@@ -189,6 +189,11 @@ data class CommonGroupContentMessageImpl<T : MessageContent>(
override val cost: Int? = null,
@SerialName(senderTagField)
override val senderTag: UserTag? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@SerialName(receiverUserField)
override val receiverUser: PreviewUser? = null,
@SerialName(ephemeralMessageIdField)
override val ephemeralMessageId: EphemeralMessageId? = null,
) : CommonGroupContentMessage<T> {
constructor(
chat: PreviewGroupChat,
@@ -475,6 +480,11 @@ data class CommonForumContentMessageImpl<T : MessageContent>(
override val cost: Int? = null,
@SerialName(senderTagField)
override val senderTag: UserTag? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@SerialName(receiverUserField)
override val receiverUser: PreviewUser? = null,
@SerialName(ephemeralMessageIdField)
override val ephemeralMessageId: EphemeralMessageId? = null,
) : CommonForumContentMessage<T> {
constructor(
chat: PreviewForumChat,
@@ -537,7 +547,12 @@ data class CommonChannelDirectMessagesContentMessageImpl<T : MessageContent>(
@SerialName(paidMessageStarCountField)
override val cost: Int? = null,
@SerialName(senderTagField)
override val senderTag: UserTag? = null
override val senderTag: UserTag? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@SerialName(receiverUserField)
override val receiverUser: PreviewUser? = null,
@SerialName(ephemeralMessageIdField)
override val ephemeralMessageId: EphemeralMessageId? = null,
) : CommonChannelDirectMessagesContentMessage<T> {
constructor(
chat: PreviewChannelDirectMessagesChat,
@@ -597,7 +612,12 @@ data class CommonSuggestedChannelDirectMessagesContentMessageImpl<T : MessageCon
@SerialName(paidMessageStarCountField)
override val cost: Int? = null,
@SerialName(senderTagField)
override val senderTag: UserTag? = null
override val senderTag: UserTag? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
@SerialName(receiverUserField)
override val receiverUser: PreviewUser? = null,
@SerialName(ephemeralMessageIdField)
override val ephemeralMessageId: EphemeralMessageId? = null,
) : CommonSuggestedChannelDirectMessagesContentMessage<T> {
constructor(
chat: PreviewChannelDirectMessagesChat,

View File

@@ -10,6 +10,8 @@ import dev.inmo.tgbotapi.types.checklists.Checklist
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.communities.CommunityChatAdded
import dev.inmo.tgbotapi.types.communities.CommunityChatRemoved
import dev.inmo.tgbotapi.types.dice.Dice
import dev.inmo.tgbotapi.types.files.*
import dev.inmo.tgbotapi.types.files.Sticker
@@ -72,6 +74,9 @@ internal data class RawMessage(
private val from: PreviewUser? = null,
private val sender_tag: UserTag? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
private val receiver_user: PreviewUser? = null,
private val ephemeral_message_id: EphemeralMessageId? = null,
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
private val sender_chat: PreviewPublicChat? = null,
private val forward_origin: MessageOrigin? = null,
private val is_topic_message: Boolean? = null,
@@ -203,6 +208,10 @@ internal data class RawMessage(
private val checklist_tasks_done: ChecklistTasksDone? = null,
private val checklist_tasks_added: ChecklistTasksAdded? = null,
// Communities
private val community_chat_added: CommunityChatAdded? = null,
private val community_chat_removed: CommunityChatRemoved? = null,
// Channel direct messages
private val direct_message_price_changed: DirectMessagesConfigurationChanged? = null,
private val is_paid_post: Boolean = false,
@@ -368,6 +377,8 @@ internal data class RawMessage(
gift_upgrade_sent != null -> gift_upgrade_sent
checklist_tasks_done != null -> checklist_tasks_done
checklist_tasks_added != null -> checklist_tasks_added
community_chat_added != null -> community_chat_added
community_chat_removed != null -> community_chat_removed
direct_message_price_changed != null -> direct_message_price_changed
suggested_post_approved != null -> suggested_post_approved
suggested_post_approval_failed != null -> suggested_post_approval_failed
@@ -534,6 +545,8 @@ internal data class RawMessage(
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
receiverUser = receiver_user,
ephemeralMessageId = ephemeral_message_id,
)
}
}
@@ -578,6 +591,8 @@ internal data class RawMessage(
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
senderTag = sender_tag,
receiverUser = receiver_user,
ephemeralMessageId = ephemeral_message_id,
)
}
}
@@ -687,6 +702,8 @@ internal data class RawMessage(
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
receiverUser = receiver_user,
ephemeralMessageId = ephemeral_message_id,
)
}
} else {
@@ -762,7 +779,9 @@ internal data class RawMessage(
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag
senderTag = sender_tag,
receiverUser = receiver_user,
ephemeralMessageId = ephemeral_message_id,
)
}
}
@@ -841,6 +860,8 @@ internal data class RawMessage(
fromOffline = is_from_offline,
cost = paid_star_count,
senderTag = sender_tag,
receiverUser = receiver_user,
ephemeralMessageId = ephemeral_message_id,
)
}
}

View File

@@ -12,7 +12,7 @@ sealed interface GroupContentMessage<T : MessageContent> : PublicContentMessage<
override val chat: PreviewGroupChat
}
sealed interface PotentiallyFromUserGroupContentMessage<T : MessageContent> : GroupContentMessage<T> {
sealed interface PotentiallyFromUserGroupContentMessage<T : MessageContent> : GroupContentMessage<T>, PossiblyEphemeralMessage {
val senderBoostsCount: Int?
val senderTag: UserTag?
}

View File

@@ -0,0 +1,9 @@
package dev.inmo.tgbotapi.types.message.abstracts
import dev.inmo.tgbotapi.types.EphemeralMessageId
import dev.inmo.tgbotapi.types.chat.PreviewUser
interface PossiblyEphemeralMessage : Message {
val receiverUser: PreviewUser?
val ephemeralMessageId: EphemeralMessageId?
}

View File

@@ -0,0 +1,85 @@
@file:OptIn(ExperimentalSerializationApi::class)
package dev.inmo.tgbotapi.types.payments
import dev.inmo.tgbotapi.abstracts.WithUser
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.invoicePayloadField
import dev.inmo.tgbotapi.types.stateField
import dev.inmo.tgbotapi.types.userField
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlin.jvm.JvmInline
/**
* Information about changes to a user payment subscription toward the current bot
*
* @param user User who subscribed for payments toward the bot
* @param invoicePayload Bot-specified invoice payload
* @param state New state of the subscription
*/
@Serializable
data class BotSubscriptionUpdated(
@SerialName(userField)
override val user: User,
@SerialName(invoicePayloadField)
val invoicePayload: String,
@SerialName(stateField)
val state: State
) : WithUser {
@Serializable(StateSerializer::class)
sealed interface State {
val name: String
@Serializable
data object Canceled : State {
@EncodeDefault
override val name = "canceled"
}
@Serializable
data object Active : State {
@EncodeDefault
override val name = "active"
}
@Serializable
data object Failed : State {
@EncodeDefault
override val name = "failed"
}
@Serializable
@JvmInline
value class Unknown(override val name: String) : State
}
private object StateSerializer : KSerializer<State> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(
serialName = "dev.inmo.tgbotapi.types.payments.BotSubscriptionUpdated.State",
kind = PrimitiveKind.STRING
)
override fun deserialize(decoder: Decoder): State {
val value = decoder.decodeString()
return when (value) {
State.Canceled.name -> State.Canceled
State.Active.name -> State.Active
State.Failed.name -> State.Failed
else -> State.Unknown(value)
}
}
override fun serialize(encoder: Encoder, value: State) {
encoder.encodeString(value.name)
}
}
}

View File

@@ -0,0 +1,72 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.typeField
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonContentPolymorphicSerializer
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
/**
* Represents a block in a rich formatted message to be sent.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblock">InputRichBlock</a>
*/
@Serializable(InputRichBlockSerializer::class)
@ClassCastsIncluded
sealed interface InputRichBlock {
val type: String
}
@Serializable(InputRichBlockSerializer::class)
sealed interface InputRichBlockMedia : InputRichBlock {
val media: TelegramMedia
val caption: RichBlockCaption?
}
/**
* The nested [InputRichBlock]s directly contained by this block, or an empty list for leaf blocks. Container blocks
* ([InputRichBlockList] via its [InputRichBlockListItem.blocks], [InputRichBlockBlockQuotation], [InputRichBlockCollage],
* [InputRichBlockSlideshow] and [InputRichBlockDetails]) expose their children here.
*/
val InputRichBlock.subBlocks: List<InputRichBlock>
get() = when (this) {
is InputRichBlockList -> items.flatMap { it.blocks }
is InputRichBlockBlockQuotation -> blocks
is InputRichBlockCollage -> blocks
is InputRichBlockSlideshow -> blocks
is InputRichBlockDetails -> blocks
else -> emptyList()
}
object InputRichBlockSerializer : JsonContentPolymorphicSerializer<InputRichBlock>(InputRichBlock::class) {
override fun selectDeserializer(element: JsonElement): DeserializationStrategy<InputRichBlock> {
return when (val type = element.jsonObject[typeField]?.jsonPrimitive?.content) {
InputRichBlockParagraph.TYPE -> InputRichBlockParagraph.serializer()
InputRichBlockSectionHeading.TYPE -> InputRichBlockSectionHeading.serializer()
InputRichBlockPreformatted.TYPE -> InputRichBlockPreformatted.serializer()
InputRichBlockFooter.TYPE -> InputRichBlockFooter.serializer()
InputRichBlockDivider.TYPE -> InputRichBlockDivider.serializer()
InputRichBlockMathematicalExpression.TYPE -> InputRichBlockMathematicalExpression.serializer()
InputRichBlockAnchor.TYPE -> InputRichBlockAnchor.serializer()
InputRichBlockList.TYPE -> InputRichBlockList.serializer()
InputRichBlockBlockQuotation.TYPE -> InputRichBlockBlockQuotation.serializer()
InputRichBlockPullQuotation.TYPE -> InputRichBlockPullQuotation.serializer()
InputRichBlockCollage.TYPE -> InputRichBlockCollage.serializer()
InputRichBlockSlideshow.TYPE -> InputRichBlockSlideshow.serializer()
InputRichBlockTable.TYPE -> InputRichBlockTable.serializer()
InputRichBlockDetails.TYPE -> InputRichBlockDetails.serializer()
InputRichBlockMap.TYPE -> InputRichBlockMap.serializer()
InputRichBlockAnimation.TYPE -> InputRichBlockAnimation.serializer()
InputRichBlockAudio.TYPE -> InputRichBlockAudio.serializer()
InputRichBlockPhoto.TYPE -> InputRichBlockPhoto.serializer()
InputRichBlockVideo.TYPE -> InputRichBlockVideo.serializer()
InputRichBlockVoiceNote.TYPE -> InputRichBlockVoiceNote.serializer()
InputRichBlockThinking.TYPE -> InputRichBlockThinking.serializer()
else -> error("Unknown InputRichBlock type: $type")
}
}
}

View File

@@ -0,0 +1,31 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.types.blocksField
import dev.inmo.tgbotapi.types.hasCheckboxField
import dev.inmo.tgbotapi.types.isCheckedField
import dev.inmo.tgbotapi.types.typeField
import dev.inmo.tgbotapi.types.valueField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* An item of an [InputRichBlockList].
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblocklistitem">InputRichBlockListItem</a>
*/
@Serializable
data class InputRichBlockListItem(
@SerialName(blocksField)
val blocks: List<InputRichBlock>,
@SerialName(hasCheckboxField)
val hasCheckbox: Boolean? = null,
@SerialName(isCheckedField)
val isChecked: Boolean? = null,
@SerialName(valueField)
val value: Int? = null,
/**
* For ordered lists, the type of the item label; must be one of "a", "A", "i", "I" or "1".
*/
@SerialName(typeField)
val labelType: String? = null
)

View File

@@ -0,0 +1,499 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.types.animationField
import dev.inmo.tgbotapi.types.audioField
import dev.inmo.tgbotapi.types.blocksField
import dev.inmo.tgbotapi.types.captionField
import dev.inmo.tgbotapi.types.cellsField
import dev.inmo.tgbotapi.types.creditField
import dev.inmo.tgbotapi.types.expressionField
import dev.inmo.tgbotapi.types.heightField
import dev.inmo.tgbotapi.types.isBorderedField
import dev.inmo.tgbotapi.types.isOpenField
import dev.inmo.tgbotapi.types.isStripedField
import dev.inmo.tgbotapi.types.itemsField
import dev.inmo.tgbotapi.types.languageField
import dev.inmo.tgbotapi.types.location.StaticLocation
import dev.inmo.tgbotapi.types.locationField
import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
import dev.inmo.tgbotapi.types.media.TelegramMediaVoiceNote
import dev.inmo.tgbotapi.types.nameField
import dev.inmo.tgbotapi.types.photoField
import dev.inmo.tgbotapi.types.sizeField
import dev.inmo.tgbotapi.types.summaryField
import dev.inmo.tgbotapi.types.textField
import dev.inmo.tgbotapi.types.typeField
import dev.inmo.tgbotapi.types.videoField
import dev.inmo.tgbotapi.types.voiceNoteField
import dev.inmo.tgbotapi.types.widthField
import dev.inmo.tgbotapi.types.zoomField
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* A text paragraph.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockparagraph">InputRichBlockParagraph</a>
*/
@Serializable
data class InputRichBlockParagraph(
@SerialName(textField)
val text: RichText
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "paragraph"
}
}
/**
* A section heading.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblocksectionheading">InputRichBlockSectionHeading</a>
*/
@Serializable
data class InputRichBlockSectionHeading(
@SerialName(textField)
val text: RichText,
/**
* Relative size of the text font; 1-6, 1 is the largest, 6 is the smallest.
*/
@SerialName(sizeField)
val level: Int
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "heading"
}
}
/**
* A preformatted text block.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockpreformatted">InputRichBlockPreformatted</a>
*/
@Serializable
data class InputRichBlockPreformatted(
@SerialName(textField)
val text: RichText,
@SerialName(languageField)
val language: String? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "pre"
}
}
/**
* A footer.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockfooter">InputRichBlockFooter</a>
*/
@Serializable
data class InputRichBlockFooter(
@SerialName(textField)
val text: RichText
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "footer"
}
}
/**
* A divider.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockdivider">InputRichBlockDivider</a>
*/
@Serializable
class InputRichBlockDivider : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override fun equals(other: Any?): Boolean = other is InputRichBlockDivider
override fun hashCode(): Int = TYPE.hashCode()
override fun toString(): String = "InputRichBlockDivider"
companion object {
const val TYPE = "divider"
}
}
/**
* A block with a mathematical expression in LaTeX format.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockmathematicalexpression">InputRichBlockMathematicalExpression</a>
*/
@Serializable
data class InputRichBlockMathematicalExpression(
@SerialName(expressionField)
val expression: String
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "mathematical_expression"
}
}
/**
* A block with an anchor.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockanchor">InputRichBlockAnchor</a>
*/
@Serializable
data class InputRichBlockAnchor(
@SerialName(nameField)
val name: String
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "anchor"
}
}
/**
* A list of blocks.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblocklist">InputRichBlockList</a>
*/
@Serializable
data class InputRichBlockList(
@SerialName(itemsField)
val items: List<InputRichBlockListItem>
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "list"
}
}
/**
* A block quotation.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockblockquotation">InputRichBlockBlockQuotation</a>
*/
@Serializable
data class InputRichBlockBlockQuotation(
@SerialName(blocksField)
val blocks: List<InputRichBlock>,
@SerialName(creditField)
val credit: RichText? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "blockquote"
}
}
/**
* A quotation with centered text.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockpullquotation">InputRichBlockPullQuotation</a>
*/
@Serializable
data class InputRichBlockPullQuotation(
@SerialName(textField)
val text: RichText,
@SerialName(creditField)
val credit: RichText? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "pullquote"
}
}
/**
* A collage.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockcollage">InputRichBlockCollage</a>
*/
@Serializable
data class InputRichBlockCollage(
@SerialName(blocksField)
val blocks: List<InputRichBlock>,
@SerialName(captionField)
val caption: RichBlockCaption? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "collage"
}
}
/**
* A slideshow.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockslideshow">InputRichBlockSlideshow</a>
*/
@Serializable
data class InputRichBlockSlideshow(
@SerialName(blocksField)
val blocks: List<InputRichBlock>,
@SerialName(captionField)
val caption: RichBlockCaption? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "slideshow"
}
}
/**
* A table.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblocktable">InputRichBlockTable</a>
*/
@Serializable
data class InputRichBlockTable(
@SerialName(cellsField)
val cells: List<List<RichBlockTableCell>>,
@SerialName(isBorderedField)
val isBordered: Boolean? = null,
@SerialName(isStripedField)
val isStriped: Boolean? = null,
@SerialName(captionField)
val caption: RichText? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "table"
}
}
/**
* An expandable block for details disclosure.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockdetails">InputRichBlockDetails</a>
*/
@Serializable
data class InputRichBlockDetails(
@SerialName(summaryField)
val summary: RichText,
@SerialName(blocksField)
val blocks: List<InputRichBlock>,
@SerialName(isOpenField)
val isOpen: Boolean? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "details"
}
}
/**
* A block with a map.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockmap">InputRichBlockMap</a>
*/
@Serializable
data class InputRichBlockMap(
@SerialName(locationField)
val location: StaticLocation,
/**
* Map zoom level; 0-24.
*/
@SerialName(zoomField)
val zoom: Int,
@SerialName(widthField)
val width: Int,
@SerialName(heightField)
val height: Int,
@SerialName(captionField)
val caption: RichBlockCaption? = null
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "map"
}
}
/**
* A block with an animation.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockanimation">InputRichBlockAnimation</a>
*/
@Serializable
data class InputRichBlockAnimation(
@SerialName(animationField)
val animation: TelegramMediaAnimation,
@SerialName(captionField)
override val caption: RichBlockCaption? = null
) : InputRichBlockMedia {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override val media: TelegramMedia
get() = animation
companion object {
const val TYPE = "animation"
}
}
/**
* A block with a music file.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockaudio">InputRichBlockAudio</a>
*/
@Serializable
data class InputRichBlockAudio(
@SerialName(audioField)
val audio: TelegramMediaAudio,
@SerialName(captionField)
override val caption: RichBlockCaption? = null
) : InputRichBlockMedia {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override val media: TelegramMedia
get() = audio
companion object {
const val TYPE = "audio"
}
}
/**
* A block with a photo.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockphoto">InputRichBlockPhoto</a>
*/
@Serializable
data class InputRichBlockPhoto(
@SerialName(photoField)
val photo: TelegramMediaPhoto,
@SerialName(captionField)
override val caption: RichBlockCaption? = null
) : InputRichBlockMedia {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override val media: TelegramMedia
get() = photo
companion object {
const val TYPE = "photo"
}
}
/**
* A block with a video.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockvideo">InputRichBlockVideo</a>
*/
@Serializable
data class InputRichBlockVideo(
@SerialName(videoField)
val video: TelegramMediaVideo,
@SerialName(captionField)
override val caption: RichBlockCaption? = null
) : InputRichBlockMedia {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override val media: TelegramMedia
get() = video
companion object {
const val TYPE = "video"
}
}
/**
* A block with a voice note.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockvoicenote">InputRichBlockVoiceNote</a>
*/
@Serializable
data class InputRichBlockVoiceNote(
@SerialName(voiceNoteField)
val voiceNote: TelegramMediaVoiceNote,
@SerialName(captionField)
override val caption: RichBlockCaption? = null
) : InputRichBlockMedia {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
override val media: TelegramMedia
get() = voiceNote
companion object {
const val TYPE = "voice_note"
}
}
/**
* A block with a "Thinking…" placeholder. May be used only in [dev.inmo.tgbotapi.requests.send.SendRichMessageDraft].
*
* @see <a href="https://core.telegram.org/bots/api#inputrichblockthinking">InputRichBlockThinking</a>
*/
@Serializable
data class InputRichBlockThinking(
@SerialName(textField)
val text: RichText
) : InputRichBlock {
@EncodeDefault
@SerialName(typeField)
override val type: String = TYPE
companion object {
const val TYPE = "thinking"
}
}

View File

@@ -0,0 +1,129 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.types.location.StaticLocation
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
import dev.inmo.tgbotapi.types.media.TelegramMediaVoiceNote
/**
* Builder of [InputRichBlockListItem]s used inside [InputRichBlocksBuilder.list].
*/
@RichTextDsl
class InputRichBlockListBuilder {
private val items = mutableListOf<InputRichBlockListItem>()
fun item(
hasCheckbox: Boolean? = null,
isChecked: Boolean? = null,
value: Int? = null,
labelType: String? = null,
block: InputRichBlocksBuilder.() -> Unit
) {
items.add(InputRichBlockListItem(buildInputRichBlocks(block), hasCheckbox, isChecked, value, labelType))
}
fun item(text: String) {
items.add(InputRichBlockListItem(listOf(InputRichBlockParagraph(RichTextPlain(text)))))
}
fun build(): List<InputRichBlockListItem> = items.toList()
}
/**
* Builder of a [List] of [InputRichBlock]s - the root of the rich message input DSL. Text-bearing and container blocks
* have their own DSL functions; media blocks (photo, video, animation, audio, voice note, collage, slideshow, table,
* map) can be appended with the matching convenience function or with [add] / unary plus.
*/
@RichTextDsl
class InputRichBlocksBuilder {
private val blocks = mutableListOf<InputRichBlock>()
/** Appends an already built [InputRichBlock]. */
fun add(block: InputRichBlock) {
blocks.add(block)
}
/** Appends an already built [InputRichBlock]. */
operator fun InputRichBlock.unaryPlus() = add(this)
fun paragraph(text: String) = add(InputRichBlockParagraph(RichTextPlain(text)))
fun paragraph(block: RichTextBuilder.() -> Unit) = add(InputRichBlockParagraph(buildRichText(block)))
fun heading(text: String, level: Int) = add(InputRichBlockSectionHeading(RichTextPlain(text), level))
fun heading(level: Int, block: RichTextBuilder.() -> Unit) = add(InputRichBlockSectionHeading(buildRichText(block), level))
fun preformatted(text: String, language: String? = null) = add(InputRichBlockPreformatted(RichTextPlain(text), language))
fun footer(text: String) = add(InputRichBlockFooter(RichTextPlain(text)))
fun footer(block: RichTextBuilder.() -> Unit) = add(InputRichBlockFooter(buildRichText(block)))
fun divider() = add(InputRichBlockDivider())
fun mathematicalExpression(expression: String) = add(InputRichBlockMathematicalExpression(expression))
fun anchor(name: String) = add(InputRichBlockAnchor(name))
fun thinking(text: String) = add(InputRichBlockThinking(RichTextPlain(text)))
fun thinking(block: RichTextBuilder.() -> Unit) = add(InputRichBlockThinking(buildRichText(block)))
fun list(block: InputRichBlockListBuilder.() -> Unit) = add(InputRichBlockList(InputRichBlockListBuilder().apply(block).build()))
fun blockQuotation(credit: RichText? = null, block: InputRichBlocksBuilder.() -> Unit) =
add(InputRichBlockBlockQuotation(buildInputRichBlocks(block), credit))
fun pullQuotation(credit: RichText? = null, block: RichTextBuilder.() -> Unit) =
add(InputRichBlockPullQuotation(buildRichText(block), credit))
fun details(summary: RichText, isOpen: Boolean? = null, block: InputRichBlocksBuilder.() -> Unit) =
add(InputRichBlockDetails(summary, buildInputRichBlocks(block), isOpen))
fun details(summary: String, isOpen: Boolean? = null, block: InputRichBlocksBuilder.() -> Unit) =
details(RichTextPlain(summary), isOpen, block)
fun photo(photo: TelegramMediaPhoto, caption: RichBlockCaption? = null) = add(InputRichBlockPhoto(photo, caption))
fun video(video: TelegramMediaVideo, caption: RichBlockCaption? = null) = add(InputRichBlockVideo(video, caption))
fun animation(animation: TelegramMediaAnimation, caption: RichBlockCaption? = null) =
add(InputRichBlockAnimation(animation, caption))
fun audio(audio: TelegramMediaAudio, caption: RichBlockCaption? = null) = add(InputRichBlockAudio(audio, caption))
fun voiceNote(voiceNote: TelegramMediaVoiceNote, caption: RichBlockCaption? = null) =
add(InputRichBlockVoiceNote(voiceNote, caption))
fun collage(caption: RichBlockCaption? = null, block: InputRichBlocksBuilder.() -> Unit) =
add(InputRichBlockCollage(buildInputRichBlocks(block), caption))
fun slideshow(caption: RichBlockCaption? = null, block: InputRichBlocksBuilder.() -> Unit) =
add(InputRichBlockSlideshow(buildInputRichBlocks(block), caption))
fun table(
cells: List<List<RichBlockTableCell>>,
isBordered: Boolean? = null,
isStriped: Boolean? = null,
caption: RichText? = null
) = add(InputRichBlockTable(cells, isBordered, isStriped, caption))
fun map(
location: StaticLocation,
zoom: Int,
width: Int,
height: Int,
caption: RichBlockCaption? = null
) = add(InputRichBlockMap(location, zoom, width, height, caption))
fun build(): List<InputRichBlock> = blocks.toList()
}
/** Builds a [List] of [InputRichBlock]s using the [InputRichBlocksBuilder] DSL. */
fun buildInputRichBlocks(block: InputRichBlocksBuilder.() -> Unit): List<InputRichBlock> = InputRichBlocksBuilder().apply(block).build()
/** Builds an [InputRichMessage] with `blocks` built using the [InputRichBlocksBuilder] DSL. */
fun InputRichMessageBlocks(
isRtl: Boolean? = null,
skipEntityDetection: Boolean? = null,
block: InputRichBlocksBuilder.() -> Unit
): InputRichMessage = InputRichMessageBlocks(buildInputRichBlocks(block), isRtl, skipEntityDetection)

View File

@@ -1,15 +1,21 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
import dev.inmo.tgbotapi.types.blocksField
import dev.inmo.tgbotapi.types.htmlField
import dev.inmo.tgbotapi.types.isRtlField
import dev.inmo.tgbotapi.types.markdownField
import dev.inmo.tgbotapi.types.media.CoveredTelegramMedia
import dev.inmo.tgbotapi.types.media.TelegramMedia
import dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia
import dev.inmo.tgbotapi.types.mediaField
import dev.inmo.tgbotapi.types.skipEntityDetectionField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* Describes a rich message to be sent. Exactly one of the fields [html] or [markdown] must be used. Use the
* [InputRichMessageHTML] and [InputRichMessageMarkdown] factories to build an instance.
* Describes a rich message to be sent. Exactly one of the fields [html], [markdown] or [blocks] must be used. Use the
* [InputRichMessageHTML], [InputRichMessageMarkdown] and [InputRichMessageBlocks] factories to build an instance.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichmessage">InputRichMessage</a>
*/
@@ -20,14 +26,21 @@ data class InputRichMessage internal constructor(
val html: String? = null,
@SerialName(markdownField)
val markdown: String? = null,
@SerialName(blocksField)
val blocks: List<InputRichBlock>? = null,
@SerialName(mediaField)
val media: List<InputRichMessageMedia>? = null,
@SerialName(isRtlField)
val isRtl: Boolean? = null,
@SerialName(skipEntityDetectionField)
val skipEntityDetection: Boolean? = null
) {
init {
require((html == null) != (markdown == null)) {
"Exactly one of the fields html or markdown must be used in InputRichMessage"
require(listOfNotNull(html, markdown, blocks).size == 1) {
"Exactly one of the fields html, markdown or blocks must be used in InputRichMessage"
}
require(media == null || blocks == null) {
"The field media of InputRichMessage can be used only together with html or markdown, not blocks"
}
}
}
@@ -40,10 +53,13 @@ data class InputRichMessage internal constructor(
fun InputRichMessageHTML(
html: String,
isRtl: Boolean? = null,
skipEntityDetection: Boolean? = null
skipEntityDetection: Boolean? = null,
media: List<InputRichMessageMedia>? = null
): InputRichMessage = InputRichMessage(
html = html,
markdown = null,
blocks = null,
media = media,
isRtl = isRtl,
skipEntityDetection = skipEntityDetection
)
@@ -56,10 +72,61 @@ fun InputRichMessageHTML(
fun InputRichMessageMarkdown(
markdown: String,
isRtl: Boolean? = null,
skipEntityDetection: Boolean? = null
skipEntityDetection: Boolean? = null,
media: List<InputRichMessageMedia>? = null
): InputRichMessage = InputRichMessage(
html = null,
markdown = markdown,
blocks = null,
media = media,
isRtl = isRtl,
skipEntityDetection = skipEntityDetection
)
/**
* Creates an [InputRichMessage] with the content described using a list of [InputRichBlock]s.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichmessage">InputRichMessage</a>
*/
fun InputRichMessageBlocks(
blocks: List<InputRichBlock>,
isRtl: Boolean? = null,
skipEntityDetection: Boolean? = null
): InputRichMessage = InputRichMessage(
html = null,
markdown = null,
blocks = blocks,
media = null,
isRtl = isRtl,
skipEntityDetection = skipEntityDetection
)
/**
* Files ([MultipartFile]) referenced by this [InputRichMessage]: the standalone [InputRichMessage.media] entries and any
* media block nested (recursively) in [InputRichMessage.blocks], keyed by [MultipartFile.fileId].
*/
internal val InputRichMessage.multipartFiles: Map<String, MultipartFile>
get() {
val mediaFiles = media.orEmpty().flatMap { it.media.multipartFiles() }
val blockFiles = blocks.orEmpty().flatMap { it.multipartFiles() }
return (mediaFiles + blockFiles).associateBy { it.fileId }
}
private fun TelegramMedia.multipartFiles(): List<MultipartFile> = listOfNotNull(
file as? MultipartFile,
if (this is ThumbedTelegramMedia) {
thumb as? MultipartFile
} else {
null
},
if (this is CoveredTelegramMedia) {
cover as? MultipartFile
} else {
null
}
)
private fun InputRichBlock.multipartFiles(): List<MultipartFile> {
val ownFiles = (this as? InputRichBlockMedia) ?.media ?.multipartFiles().orEmpty()
return ownFiles + subBlocks.flatMap { it.multipartFiles() }
}

View File

@@ -0,0 +1,29 @@
package dev.inmo.tgbotapi.types.rich
import dev.inmo.tgbotapi.types.idField
import dev.inmo.tgbotapi.types.media.RichMessageMemberTelegramMedia
import dev.inmo.tgbotapi.types.mediaField
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
private val inputRichMessageMediaIdRegex = Regex("[A-Za-z0-9_-]{1,64}")
/**
* Describes a media referenced from [InputRichMessage.html]/[InputRichMessage.markdown] via `tg://photo?id=`,
* `tg://video?id=` and `tg://audio?id=` links.
*
* @see <a href="https://core.telegram.org/bots/api#inputrichmessagemedia">InputRichMessageMedia</a>
*/
@Serializable
data class InputRichMessageMedia(
@SerialName(idField)
val id: String,
@SerialName(mediaField)
val media: RichMessageMemberTelegramMedia
) {
init {
require(id.matches(inputRichMessageMediaIdRegex)) {
"id of InputRichMessageMedia must be 1-64 characters long and contain only latin letters, digits, underscores and hyphens, but was \"$id\""
}
}
}

Some files were not shown because too many files have changed in this diff Show More