mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 08:37:12 +00:00
commit
6b62070447
8
.github/labeler.yml
vendored
8
.github/labeler.yml
vendored
@ -1,6 +1,8 @@
|
||||
api: "TelegramBotAPI-extensions-api/**"
|
||||
utils: "TelegramBotAPI-extensions-utils/**"
|
||||
core: "TelegramBotAPI/**" # currently not work
|
||||
api: "TelegramBotAPI-api/**"
|
||||
utils: "TelegramBotAPI-utils/**"
|
||||
behaviour-builder: "TelegramBotAPI-behaviour_builder/**"
|
||||
behaviour-builder_fsm: "TelegramBotAPI-behaviour_builder-fsm/**"
|
||||
core: "TelegramBotAPI-core/**" # currently not work
|
||||
|
||||
code: "**/*.kt"
|
||||
gradle: "**/*.gradle"
|
||||
|
1
.github/workflows/label.yml
vendored
1
.github/workflows/label.yml
vendored
@ -12,6 +12,7 @@ on:
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == github.repository_owner }}
|
||||
steps:
|
||||
- uses: actions/labeler@v2
|
||||
with:
|
||||
|
2
.github/workflows/packages_publishing.yml
vendored
2
.github/workflows/packages_publishing.yml
vendored
@ -17,6 +17,8 @@ jobs:
|
||||
cat gradle.properties | sed -e "s/^library_version=\([0-9\.]*\)/library_version=\1-branch_$branch-build${{ github.run_number }}/" > gradle.properties.tmp
|
||||
rm gradle.properties
|
||||
mv gradle.properties.tmp gradle.properties
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
- name: Publish
|
||||
continue-on-error: true
|
||||
run: ./gradlew publishAllPublicationsToGithubPackagesRepository --no-parallel -x signJsPublication -x signJvmPublication -x signKotlinMultiplatformPublication
|
||||
|
45
CHANGELOG.md
45
CHANGELOG.md
@ -1,5 +1,50 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 0.36.0
|
||||
|
||||
**ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED**
|
||||
**ALL EXTENSION PACKAGES HAS BEEN RENAMES**. Old packages are still available, but will be removed in next major update:
|
||||
|
||||
* `tgbotapi.extensions.api` -> `tgbotape.api`
|
||||
* `tgbotapi.extensions.utils` -> `tgbotape.utils`
|
||||
* `tgbotapi.extensions.behaviour_builder` -> `tgbotape.behaviour_builder`
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Serialization`: `1.2.2` -> `1.3.0`
|
||||
* `MicroUtils`: `0.5.28` -> `0.7.2`
|
||||
* `Klock`: `2.4.3` -> `2.4.6`
|
||||
* `Ktor`: `1.6.3` -> `1.6.4`
|
||||
* `Core`:
|
||||
* `PrivateContentMessageImpl#paymentInfo` now is deprecated and will always be null
|
||||
* `PayInlineKeyboardButton#pay` now is deprecated
|
||||
* `RowBuilder` and `MatrixBuilder` now are open and available for extending
|
||||
* `MatrixBuilder#matrix` will return read-only new list instead of original internal `mutMatrix`
|
||||
* Introduced new type of events `SuccessfulPaymentEvent` instead of putting of payment inside of message
|
||||
* New type of events union: `PublicChatEvent`. `CommonEvent` is still union of any `ChatEvent`
|
||||
* New `AbstractFlowsUpdatesFilter` with default `lazy` realization for all typed flows
|
||||
* `FlowsUpdatesFilter` fun now have `onBufferOverflow` and `upstreamUpdatesFlow` as incoming params
|
||||
* `DefaultFlowsUpdatesFilter` now use additional `upstreamUpdatesFlow` as source of updates
|
||||
* `Utils`:
|
||||
* Two new dsl:
|
||||
* `inlineKeyboard` for creating `InlineKeyboardMarkup`
|
||||
* `replyKeyboard` for creating `ReplyKeyboardMarkup`
|
||||
* Cast helpers for `Message` (thanks to [madhead](https://github.com/madhead)):
|
||||
* `asPossiblyReplyMessage`: tries to cast a `Message` to `PossiblyReplyMessage`, returns `null` if the message is not of that type
|
||||
* `requirePossiblyReplyMessage`: casts a `Message` to `PossiblyReplyMessage`, fails if the message is not of that type
|
||||
* `whenPossiblyReplyMessage`: tries to cast a `Message` to `PossiblyReplyMessage` and runs the given block of code with it, if the cast is successful
|
||||
* New type `WithUser` for unioning of all types with `user`
|
||||
* `FromUser` now extends `WithUser`
|
||||
* Cast helpers for type `WithUser`: `asWithUser`, `whenWithUser`, `requireWithUser`
|
||||
* `Behaviour Builder`:
|
||||
* New expecters and waiters:
|
||||
* `waitShippingQueries`/`onShippingQuery`
|
||||
* `waitPreCheckoutQueries`/`onPreCheckoutQuery`
|
||||
* `waitChosenInlineResult`/`onChosenInlineResult`
|
||||
* `waitPollUpdates`/`onPollUpdates`
|
||||
* `Behaviour Builder FSM extension`:
|
||||
* See [Difference between old Behaviour Builder and new one with FSM](https://telegra.ph/Difference-between-old-Behaviour-Builder-and-new-one-with-FSM-10-18)
|
||||
|
||||
## 0.35.9
|
||||
|
||||
* `Common`:
|
||||
|
@ -15,11 +15,12 @@ Hello! This is a set of libraries for working with Telegram Bot API.
|
||||
|
||||
| Common info | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://github.com/InsanusMokrassar/TelegramBotAPI/workflows/Build/badge.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI/actions) [Small survey](https://forms.gle/2Hex2ynbHWHhi1KY7)|
|
||||
| -------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Useful links | [![Chat in Telegram](badges/chat.svg)](https://t.me/InMoTelegramBotAPI) [![Create bot](badges/template.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [![KDocs](badges/kdocs.svg)](https://tgbotapi.inmo.dev/index.html) [Examples](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/), [Mini tutorial](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
|
||||
| Useful links | [![Chat in Telegram](https://img.shields.io/static/v1?label=Talk&message=Telegram&color=blue)](https://t.me/InMoTelegramBotAPI) [![Create bot](https://img.shields.io/static/v1?label=Github&message=Template&color=blue)](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [![KDocs](https://img.shields.io/static/v1?label=Open&message=kdocs&color=blue)](https://tgbotapi.inmo.dev/index.html) [Examples](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/), [Mini tutorial](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
|
||||
| TelegramBotAPI Core status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core) |
|
||||
| TelegramBotAPI API Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api) |
|
||||
| TelegramBotAPI Util Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils) |
|
||||
| TelegramBotAPI Behaviour Builder Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.behaviour_builder/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.behaviour_builder) |
|
||||
| TelegramBotAPI API Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api) |
|
||||
| TelegramBotAPI Util Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.utils) |
|
||||
| TelegramBotAPI Behaviour Builder Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.behaviour_builder/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.behaviour_builder) |
|
||||
| TelegramBotAPI Behaviour Builder Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.behaviour_builder.fsm/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.behaviour_builder.fsm) |
|
||||
| TelegramBotAPI All status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) |
|
||||
|
||||
## Examples
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M35 0h69v20H35z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Talk</text>
|
||||
<text x="175" y="140" transform="scale(.1)">Talk</text>
|
||||
<text x="690" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Telegram</text>
|
||||
<text x="690" y="140" transform="scale(.1)">Telegram</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1018 B |
@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M45 0h69v20H45z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="225" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Open</text>
|
||||
<text x="225" y="140" transform="scale(.1)">Open</text>
|
||||
<text x="740" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">KDocs</text>
|
||||
<text x="740" y="140" transform="scale(.1)">KDocs</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1012 B |
@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M35 0h69v20H35z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Bot</text>
|
||||
<text x="175" y="140" transform="scale(.1)">Bot</text>
|
||||
<text x="690" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Template</text>
|
||||
<text x="690" y="140" transform="scale(.1)">Template</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1016 B |
@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@ -20,7 +19,6 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
dokka_version=1.5.30
|
||||
dokka_version=1.5.31
|
||||
|
||||
org.gradle.jvmargs=-Xmx1024m
|
||||
|
@ -7,16 +7,16 @@ kotlin.incremental.js=true
|
||||
|
||||
kotlin_version=1.5.31
|
||||
kotlin_coroutines_version=1.5.2
|
||||
kotlin_serialisation_runtime_version=1.2.2
|
||||
klock_version=2.4.2
|
||||
kotlin_serialisation_runtime_version=1.3.0
|
||||
klock_version=2.4.6
|
||||
uuid_version=0.3.1
|
||||
ktor_version=1.6.3
|
||||
ktor_version=1.6.4
|
||||
|
||||
micro_utils_version=0.5.28
|
||||
micro_utils_version=0.7.2
|
||||
|
||||
javax_activation_version=1.1.1
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=0.35.9
|
||||
library_version=0.36.0
|
||||
|
||||
github_release_plugin_version=2.2.12
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 16 KiB |
@ -8,13 +8,17 @@ pluginManagement {
|
||||
}
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
include ":tgbotapi.core"
|
||||
include ":tgbotapi.api"
|
||||
include ":tgbotapi.utils"
|
||||
include ":tgbotapi.behaviour_builder"
|
||||
include ":tgbotapi.behaviour_builder.fsm"
|
||||
include ":tgbotapi.extensions.api"
|
||||
include ":tgbotapi.extensions.utils"
|
||||
include ":tgbotapi.extensions.behaviour_builder"
|
||||
include ":tgbotapi.extensions.behaviour_builder.fsm"
|
||||
include ":tgbotapi"
|
||||
include ":docs"
|
||||
|
@ -1,18 +1,6 @@
|
||||
# TelegramBotAPI extensions
|
||||
# TelegramBotAPI API extensions
|
||||
|
||||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api)
|
||||
|
||||
- [TelegramBotAPI extensions](#telegrambotapi-extensions)
|
||||
* [What is it?](#what-is-it)
|
||||
* [Compatibility](#compatibility)
|
||||
* [How to implement library?](#how-to-implement-library)
|
||||
+ [Maven](#maven)
|
||||
+ [Gradle](#gradle)
|
||||
* [Example of usage and comparison with `TelegramBotAPI`](#example-of-usage-and-comparison-with-telegrambotapi)
|
||||
* [Updates](#updates)
|
||||
+ [Alternative way](#alternative-way)
|
||||
|
||||
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
|
||||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api)
|
||||
|
||||
## What is it?
|
||||
|
||||
@ -28,10 +16,9 @@ This library always compatible with original `tgbotapi.core` library version
|
||||
|
||||
Common ways to implement this library are presented here. In some cases it will require additional steps
|
||||
like inserting of additional libraries (like `kotlin stdlib`). In the examples will be used variable
|
||||
`telegrambotapi-extensions-api.version`, which must be set up by developer. Available versions are presented on
|
||||
[bintray](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api), next version is last published:
|
||||
`telegrambotapi-extensions-api.version`, which must be set up by developer.
|
||||
|
||||
[![Download](https://api.bintray.com/packages/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/images/download.svg) ](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/_latestVersion)
|
||||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api)
|
||||
|
||||
### Maven
|
||||
|
||||
@ -40,7 +27,7 @@ Dependency config presented here:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>dev.inmo</groupId>
|
||||
<artifactId>tgbotapi.extensions.api</artifactId>
|
||||
<artifactId>tgbotapi.api</artifactId>
|
||||
<version>${telegrambotapi-extensions-api.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
@ -49,18 +36,18 @@ Dependency config presented here:
|
||||
|
||||
To use last versions you will need to add one line in repositories block of your `build.gradle`:
|
||||
|
||||
`jcenter()` or `mavenCentral()`
|
||||
`mavenCentral()`
|
||||
|
||||
And add next line to your dependencies block:
|
||||
|
||||
```groovy
|
||||
implementation "dev.inmo:tgbotapi.extensions.api:$telegrambotapi_extensions_api_version"
|
||||
implementation "dev.inmo:tgbotapi.api:$telegrambotapi_extensions_api_version"
|
||||
```
|
||||
|
||||
or for old gradle:
|
||||
|
||||
```groovy
|
||||
compile "dev.inmo:tgbotapi.extensions.api:$telegrambotapi_extensions_api_version"
|
||||
compile "dev.inmo:tgbotapi.api:$telegrambotapi_extensions_api_version"
|
||||
```
|
||||
|
||||
## Example of usage and comparison with `TelegramBotAPI`
|
||||
@ -82,7 +69,7 @@ val bot = telegramBot("IT IS YOUR TOKEN") {
|
||||
|
||||
In all examples supposed that you have created bot.
|
||||
|
||||
| tgbotapi.core | tgbotapi.extensions.api |
|
||||
| tgbotapi.core | tgbotapi.api |
|
||||
|---------------------|-------------------------------|
|
||||
| bot.execute(GetMe) | bot.getMe() |
|
||||
| bot.execute(SendTextMessage(someChatId, text)) | bot.sendTextMessage(chat, text) |
|
||||
@ -90,8 +77,8 @@ In all examples supposed that you have created bot.
|
||||
## Updates
|
||||
|
||||
**Currently, these paragraphs almost outdated due to the fact that extensions for listening of updates and webhooks were
|
||||
replaced into `tgbotapi.extensions.utils`. But, most part of information below is correct with small fixes and
|
||||
adding of `tgbotapi.extensions.utils` dependency.**
|
||||
replaced into `tgbotapi.utils`. But, most part of information below is correct with small fixes and
|
||||
adding of `tgbotapi.utils` dependency.**
|
||||
|
||||
Usually, it is more comfortable to use filter object to get separated types of updates:
|
||||
|
50
tgbotapi.api/build.gradle
Normal file
50
tgbotapi.api/build.gradle
Normal file
@ -0,0 +1,50 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
}
|
||||
|
||||
project.version = "$library_version"
|
||||
project.group = "$library_group"
|
||||
|
||||
apply from: "publish.gradle"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
browser()
|
||||
nodejs()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
api project(":tgbotapi.core")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(8)
|
||||
}
|
||||
}
|
||||
|
1
tgbotapi.api/mpp_publish_template.kpsb
Normal file
1
tgbotapi.api/mpp_publish_template.kpsb
Normal file
@ -0,0 +1 @@
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Extensions for API","description":"API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-api","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GithubPackages","url":"https://maven.pkg.github.com/InsanusMokrassar/TelegramBotAPI"},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}]}}
|
69
tgbotapi.api/publish.gradle
Normal file
69
tgbotapi.api/publish.gradle
Normal file
@ -0,0 +1,69 @@
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
artifact javadocsJar
|
||||
|
||||
pom {
|
||||
description = "API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference"
|
||||
name = "Telegram Bot API Extensions for API"
|
||||
url = "https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-api"
|
||||
|
||||
scm {
|
||||
developerConnection = "scm:git:[fetch=]https://github.com/insanusmokrassar/TelegramBotAPI.git[push=]https://github.com/insanusmokrassar/TelegramBotAPI.git"
|
||||
url = "https://github.com/insanusmokrassar/TelegramBotAPI.git"
|
||||
}
|
||||
|
||||
developers {
|
||||
|
||||
developer {
|
||||
id = "InsanusMokrassar"
|
||||
name = "Ovsiannikov Aleksei"
|
||||
email = "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
licenses {
|
||||
|
||||
license {
|
||||
name = "Apache Software License 2.0"
|
||||
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
if ((project.hasProperty('GITHUBPACKAGES_USER') || System.getenv('GITHUBPACKAGES_USER') != null) && (project.hasProperty('GITHUBPACKAGES_PASSWORD') || System.getenv('GITHUBPACKAGES_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "GithubPackages"
|
||||
url = uri("https://maven.pkg.github.com/InsanusMokrassar/TelegramBotAPI")
|
||||
credentials {
|
||||
username = project.hasProperty('GITHUBPACKAGES_USER') ? project.property('GITHUBPACKAGES_USER') : System.getenv('GITHUBPACKAGES_USER')
|
||||
password = project.hasProperty('GITHUBPACKAGES_PASSWORD') ? project.property('GITHUBPACKAGES_PASSWORD') : System.getenv('GITHUBPACKAGES_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign publishing.publications
|
||||
}
|
@ -48,6 +48,10 @@ class LiveLocationProvider internal constructor(
|
||||
val lastLocation: LiveLocation
|
||||
get() = message.content.location as LiveLocation
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun updateLocation(
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@ -73,6 +77,10 @@ class LiveLocationProvider internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatIdentifier,
|
||||
@ -112,6 +120,10 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
@ -140,6 +152,10 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatId,
|
||||
@ -167,6 +183,10 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
@ -194,6 +214,10 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
to: Message,
|
||||
scope: CoroutineScope,
|
||||
@ -221,6 +245,10 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
to: Message,
|
||||
scope: CoroutineScope,
|
@ -7,6 +7,10 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -15,18 +19,30 @@ suspend fun TelegramBot.stopPoll(
|
||||
StopPoll(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatId,
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chatId, message.messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
message: Message,
|
@ -12,13 +12,3 @@ suspend fun TelegramBot.getChatMemberCount(
|
||||
suspend fun TelegramBot.getChatMemberCount(
|
||||
chat: PublicChat
|
||||
) = getChatMemberCount(chat.id)
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("getChatMemberCount", "dev.inmo.tgbotapi.extensions.api.chat.get.getChatMemberCount"))
|
||||
suspend fun TelegramBot.getChatMembersCount(
|
||||
chatId: ChatIdentifier
|
||||
) = getChatMemberCount(chatId)
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("getChatMemberCount", "dev.inmo.tgbotapi.extensions.api.chat.get.getChatMemberCount"))
|
||||
suspend fun TelegramBot.getChatMembersCount(
|
||||
chat: PublicChat
|
||||
) = getChatMemberCount(chat)
|
@ -0,0 +1,34 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = execute(BanChatMember(chatId, userId, untilDate, revokeMessages))
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chat.id, userId, untilDate, revokeMessages)
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chatId, user.id, untilDate, revokeMessages)
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chat.id, user.id, untilDate, revokeMessages)
|
@ -9,6 +9,10 @@ import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -24,6 +28,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -35,6 +43,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
latitude: Double,
|
||||
@ -45,6 +57,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message.chat, message.messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -56,6 +72,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -63,6 +83,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
location: LiveLocation,
|
@ -9,6 +9,10 @@ import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -19,12 +23,20 @@ suspend fun TelegramBot.stopLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
@ -5,6 +5,10 @@ import dev.inmo.tgbotapi.requests.edit.LiveLocation.StopInlineMessageLiveLocatio
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
@ -8,6 +8,10 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -16,12 +20,20 @@ suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
EditChatMessageReplyMarkup(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
@ -5,6 +5,10 @@ import dev.inmo.tgbotapi.requests.edit.ReplyMarkup.EditInlineMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
@ -13,6 +13,10 @@ import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -23,6 +27,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
EditChatMessageCaption(chatId, messageId, text, parseMode, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -31,6 +39,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageCaption(chat.id, messageId, text, parseMode, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun <T> TelegramBot.editMessageCaption(
|
||||
message: ContentMessage<T>,
|
||||
text: String,
|
||||
@ -40,6 +52,10 @@ suspend fun <T> TelegramBot.editMessageCaption(
|
||||
return editMessageCaption(message.chat.id, message.messageId, text, parseMode, replyMarkup)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -49,6 +65,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
EditChatMessageCaption(chatId, messageId, entities, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -56,6 +76,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageCaption(chat.id, messageId, entities, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun <T> TelegramBot.editMessageCaption(
|
||||
message: ContentMessage<T>,
|
||||
entities: List<TextSource>,
|
@ -7,6 +7,10 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
@ -14,6 +18,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageCaption(inlineMessageId, text, parseMode, replyMarkup))
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
entities: TextSourcesList,
|
@ -10,6 +10,10 @@ import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -19,6 +23,10 @@ suspend fun TelegramBot.editMessageMedia(
|
||||
EditChatMessageMedia(chatId, messageId, media, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -26,6 +34,10 @@ suspend fun TelegramBot.editMessageMedia(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageMedia(chat.id, messageId, media, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
message: ContentMessage<out MediaContent>,
|
||||
media: InputMedia,
|
@ -6,6 +6,10 @@ import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.InputMedia.InputMedia
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
media: InputMedia,
|
@ -11,6 +11,10 @@ import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -22,6 +26,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
EditChatMessageText(chatId, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -31,6 +39,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(chat.id, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
message: ContentMessage<TextContent>,
|
||||
text: String,
|
||||
@ -39,6 +51,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(message.chat.id, message.messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -49,6 +65,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
EditChatMessageText(chatId, messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@ -57,6 +77,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(chat.id, messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
message: ContentMessage<TextContent>,
|
||||
entities: TextSourcesList,
|
@ -7,6 +7,10 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
@ -15,6 +19,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageText(inlineMessageId, text, parseMode, disableWebPagePreview, replyMarkup))
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
entities: TextSourcesList,
|
@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.extensions.api.files
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.get.getFileAdditionalInfo
|
||||
import dev.inmo.tgbotapi.requests.DownloadFileStream
|
||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||
import dev.inmo.tgbotapi.types.files.PathedFile
|
||||
import dev.inmo.tgbotapi.types.files.abstracts.TelegramMediaFile
|
@ -10,6 +10,10 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -24,6 +28,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
CopyMessage(fromChatId, toChatId, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -36,6 +44,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, toChatId, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
@ -48,6 +60,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChatId, toChat.id, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
@ -60,6 +76,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, toChat.id, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: Message,
|
||||
@ -71,6 +91,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, toChatId, message.messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
message: Message,
|
||||
@ -83,6 +107,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
) = copyMessage(message.chat, toChat, message.messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -96,6 +124,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
CopyMessage(fromChatId, toChatId, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
toChatId: ChatIdentifier,
|
||||
@ -107,6 +139,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, toChatId, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
@ -118,6 +154,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChatId, toChat.id, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
@ -129,6 +169,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(fromChat.id, toChat.id, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: Message,
|
||||
@ -139,6 +183,10 @@ suspend inline fun TelegramBot.copyMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = copyMessage(message.chat, toChatId, message.messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.copyMessage(
|
||||
toChat: Chat,
|
||||
message: Message,
|
@ -28,6 +28,10 @@ import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
|
||||
// Contact
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
phoneNumber: String,
|
||||
@ -47,6 +51,10 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
contact: Contact,
|
||||
@ -65,6 +73,10 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Dice
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithDice(
|
||||
to: Message,
|
||||
animationType: DiceAnimationType? = null,
|
||||
@ -73,6 +85,10 @@ suspend inline fun TelegramBot.replyWithDice(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendDice(to.chat, animationType, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
animationType: DiceAnimationType,
|
||||
@ -84,6 +100,10 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Location
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
latitude: Double,
|
||||
@ -99,6 +119,10 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
location: StaticLocation,
|
||||
@ -115,6 +139,10 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Text message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
text: String,
|
||||
@ -134,6 +162,10 @@ suspend inline fun TelegramBot.reply(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
entities: TextSourcesList,
|
||||
@ -154,6 +186,10 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Venue
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
latitude: Double,
|
||||
@ -646,6 +682,10 @@ suspend inline fun TelegramBot.reply(
|
||||
|
||||
// Invoice
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
title: String,
|
@ -1,6 +1,7 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.*
|
||||
import dev.inmo.micro_utils.coroutines.safelyWithResult
|
||||
import dev.inmo.micro_utils.coroutines.safelyWithoutExceptions
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.SendAction
|
||||
import dev.inmo.tgbotapi.types.*
|
@ -6,6 +6,10 @@ import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
phoneNumber: String,
|
||||
@ -21,6 +25,10 @@ suspend fun TelegramBot.sendContact(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
contact: Contact,
|
||||
@ -34,6 +42,10 @@ suspend fun TelegramBot.sendContact(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
phoneNumber: String,
|
||||
@ -47,6 +59,10 @@ suspend fun TelegramBot.sendContact(
|
||||
chat.id, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
contact: Contact,
|
@ -8,6 +8,10 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDice(
|
||||
chatId: ChatIdentifier,
|
||||
animationType: DiceAnimationType? = null,
|
||||
@ -19,6 +23,10 @@ suspend fun TelegramBot.sendDice(
|
||||
SendDice(chatId, animationType, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDice(
|
||||
chat: Chat,
|
||||
animationType: DiceAnimationType? = null,
|
@ -8,6 +8,10 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
@ -26,6 +30,10 @@ suspend fun TelegramBot.sendLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: StaticLocation,
|
||||
@ -41,6 +49,10 @@ suspend fun TelegramBot.sendLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
@ -57,6 +69,10 @@ suspend fun TelegramBot.sendLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
location: StaticLocation,
|
||||
@ -72,6 +88,10 @@ suspend fun TelegramBot.sendLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
@ -81,6 +101,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, latitude, longitude, disableNotification, replyToMessageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: StaticLocation,
|
||||
@ -89,6 +113,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chatId, location.latitude, location.longitude, disableNotification, replyToMessageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
@ -98,6 +126,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendLocation(chat.id, latitude, longitude, disableNotification, replyToMessageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendStaticLocation(
|
||||
chat: Chat,
|
||||
location: StaticLocation,
|
@ -9,6 +9,10 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
@ -22,6 +26,10 @@ suspend fun TelegramBot.sendMessage(
|
||||
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
@ -35,6 +43,10 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
@ -47,6 +59,10 @@ suspend fun TelegramBot.sendMessage(
|
||||
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
@ -58,6 +74,10 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
entities: TextSourcesList,
|
||||
@ -70,6 +90,10 @@ suspend fun TelegramBot.sendMessage(
|
||||
SendTextMessage(chatId, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
entities: TextSourcesList,
|
||||
@ -82,6 +106,10 @@ suspend fun TelegramBot.sendTextMessage(
|
||||
chatId, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
entities: TextSourcesList,
|
||||
@ -93,6 +121,10 @@ suspend fun TelegramBot.sendMessage(
|
||||
) = sendMessage(chat.id, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
entities: TextSourcesList,
|
@ -8,6 +8,10 @@ import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import dev.inmo.tgbotapi.types.venue.Venue
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
@ -40,6 +44,10 @@ suspend fun TelegramBot.sendVenue(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
@ -70,6 +78,10 @@ suspend fun TelegramBot.sendVenue(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
location: StaticLocation,
|
||||
@ -99,6 +111,10 @@ suspend fun TelegramBot.sendVenue(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
location: StaticLocation,
|
||||
@ -128,6 +144,10 @@ suspend fun TelegramBot.sendVenue(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
venue: Venue,
|
||||
@ -146,6 +166,10 @@ suspend fun TelegramBot.sendVenue(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
venue: Venue,
|
@ -1,16 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.games
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithGame
|
||||
import dev.inmo.tgbotapi.requests.send.games.SendGame
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.games.Game
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
gameShortName: String,
|
||||
@ -24,6 +25,10 @@ suspend fun TelegramBot.sendGame(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
gameShortName: String,
|
||||
@ -35,6 +40,10 @@ suspend fun TelegramBot.sendGame(
|
||||
chat.id, gameShortName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
game: Game,
|
||||
@ -46,6 +55,10 @@ suspend fun TelegramBot.sendGame(
|
||||
chatId, game.title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
game: Game,
|
||||
@ -56,39 +69,3 @@ suspend fun TelegramBot.sendGame(
|
||||
) = sendGame(
|
||||
chat.id, game.title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithGame", "dev.inmo.tgbotapi.extensions.api.send.replyWithGame")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithGame(
|
||||
to: Message,
|
||||
gameShortName: String,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithGame(to, gameShortName, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithGame", "dev.inmo.tgbotapi.extensions.api.send.replyWithGame")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithGame(
|
||||
to: Message,
|
||||
game: Game,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithGame(to, game, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
game: Game,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, game, disableNotification, allowSendingWithoutReply, replyMarkup)
|
@ -1,8 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithAnimation
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.requests.send.media.SendAnimation
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
@ -12,8 +10,11 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.files.AnimationFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: InputFile,
|
||||
@ -44,6 +45,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: AnimationFile,
|
||||
@ -60,6 +65,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
chatId, animation.fileId, animation.thumb ?.fileId, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: InputFile,
|
||||
@ -75,6 +84,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(chat.id, animation, thumb, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: AnimationFile,
|
||||
@ -90,6 +103,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
) = sendAnimation(chat.id, animation, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: InputFile,
|
||||
@ -118,6 +135,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: AnimationFile,
|
||||
@ -133,6 +154,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
chatId, animation.fileId, animation.thumb ?.fileId, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: InputFile,
|
||||
@ -147,6 +172,10 @@ suspend fun TelegramBot.sendAnimation(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(chat.id, animation, thumb, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chat: Chat,
|
||||
animation: AnimationFile,
|
||||
@ -159,128 +188,3 @@ suspend fun TelegramBot.sendAnimation(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAnimation(chat.id, animation, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithAnimation", "dev.inmo.tgbotapi.extensions.api.send.replyWithAnimation")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAnimation(
|
||||
to: Message,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithAnimation(
|
||||
to,
|
||||
animation,
|
||||
entities,
|
||||
thumb,
|
||||
duration,
|
||||
width,
|
||||
height,
|
||||
disableNotification,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAnimation(
|
||||
to: Message,
|
||||
animation: AnimationFile,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, animation, entities, duration, width, height, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
animation: AnimationFile,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, animation, entities, duration, width, height, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithAnimation", "dev.inmo.tgbotapi.extensions.api.send.replyWithAnimation")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAnimation(
|
||||
to: Message,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithAnimation(
|
||||
to,
|
||||
animation,
|
||||
thumb,
|
||||
text,
|
||||
parseMode,
|
||||
duration,
|
||||
width,
|
||||
height,
|
||||
disableNotification,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithAnimation", "dev.inmo.tgbotapi.extensions.api.send.replyWithAnimation")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAnimation(
|
||||
to: Message,
|
||||
animation: AnimationFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, animation, text, parseMode, duration, width, height, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
animation: AnimationFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, animation, text, parseMode, duration, width, height, disableNotification, allowSendingWithoutReply, replyMarkup)
|
@ -1,8 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithAudio
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.requests.send.media.SendAudio
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
@ -12,8 +10,11 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: InputFile,
|
||||
@ -44,6 +45,10 @@ suspend fun TelegramBot.sendAudio(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: InputFile,
|
||||
@ -59,6 +64,10 @@ suspend fun TelegramBot.sendAudio(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: AudioFile,
|
||||
@ -71,6 +80,10 @@ suspend fun TelegramBot.sendAudio(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: AudioFile,
|
||||
@ -84,6 +97,10 @@ suspend fun TelegramBot.sendAudio(
|
||||
) = sendAudio(chat.id, audio, text, parseMode, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: InputFile,
|
||||
@ -112,6 +129,10 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: InputFile,
|
||||
@ -126,6 +147,10 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: AudioFile,
|
||||
@ -137,6 +162,10 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, entities, audio.duration, audio.performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendAudio(
|
||||
chat: Chat,
|
||||
audio: AudioFile,
|
||||
@ -147,97 +176,3 @@ suspend inline fun TelegramBot.sendAudio(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendAudio(chat.id, audio, entities, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithAudio", "dev.inmo.tgbotapi.extensions.api.send.replyWithAudio")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAudio(
|
||||
to: Message,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null,
|
||||
performer: String? = null,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithAudio(to, audio, thumb, text, parseMode, duration, performer, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAudio(
|
||||
to: Message,
|
||||
audio: AudioFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, audio, text, parseMode, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
audio: AudioFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, audio, text, parseMode, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithAudio", "dev.inmo.tgbotapi.extensions.api.send.replyWithAudio")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAudio(
|
||||
to: Message,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null,
|
||||
performer: String? = null,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithAudio(to, audio, thumb, entities, duration, performer, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithAudio(
|
||||
to: Message,
|
||||
audio: AudioFile,
|
||||
entities: TextSourcesList,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, audio, entities, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.repl")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
audio: AudioFile,
|
||||
entities: TextSourcesList,
|
||||
title: String? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, audio, entities, title, disableNotification, allowSendingWithoutReply, replyMarkup)
|
@ -1,8 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithDocument
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.requests.send.media.SendDocument
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
@ -12,8 +10,11 @@ import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: InputFile,
|
||||
@ -40,6 +41,10 @@ suspend fun TelegramBot.sendDocument(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: InputFile,
|
||||
@ -53,6 +58,10 @@ suspend fun TelegramBot.sendDocument(
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, thumb, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: DocumentFile,
|
||||
@ -67,6 +76,10 @@ suspend fun TelegramBot.sendDocument(
|
||||
chatId, document.fileId, document.thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: DocumentFile,
|
||||
@ -79,6 +92,10 @@ suspend fun TelegramBot.sendDocument(
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: InputFile,
|
||||
@ -103,6 +120,10 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: InputFile,
|
||||
@ -115,6 +136,10 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, thumb, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: DocumentFile,
|
||||
@ -128,6 +153,10 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
chatId, document.fileId, document.thumb ?.fileId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendDocument(
|
||||
chat: Chat,
|
||||
document: DocumentFile,
|
||||
@ -138,93 +167,3 @@ suspend inline fun TelegramBot.sendDocument(
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = sendDocument(chat.id, document, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithDocument", "dev.inmo.tgbotapi.extensions.api.send.replyWithDocument")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithDocument(
|
||||
to: Message,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = replyWithDocument(to, document, thumb, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithDocument(
|
||||
to: Message,
|
||||
document: DocumentFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = reply(to, document, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
document: DocumentFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = reply(to, document, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithDocument", "dev.inmo.tgbotapi.extensions.api.send.replyWithDocument")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithDocument(
|
||||
to: Message,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = replyWithDocument(to, document, thumb, entities, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithDocument(
|
||||
to: Message,
|
||||
document: DocumentFile,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = reply(to, document, entities, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
document: DocumentFile,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = reply(to, document, entities, disableNotification, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
@ -1,16 +1,11 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithDocuments
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithGallery
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithMediaGroup
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithPlaylist
|
||||
import dev.inmo.tgbotapi.requests.send.media.*
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.InputMedia.*
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaGroupContent
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
|
||||
@ -127,60 +122,3 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
||||
) = sendVisualMediaGroup(
|
||||
chat.id, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithMediaGroup", "dev.inmo.tgbotapi.extensions.api.send.replyWithMediaGroup")
|
||||
)
|
||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||
suspend inline fun TelegramBot.replyWithMediaGroup(
|
||||
to: Message,
|
||||
media: List<MediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = replyWithMediaGroup(to, media, disableNotification, allowSendingWithoutReply)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithPlaylist", "dev.inmo.tgbotapi.extensions.api.send.replyWithPlaylist")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithPlaylist(
|
||||
to: Message,
|
||||
media: List<AudioMediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = replyWithPlaylist(to, media, disableNotification, allowSendingWithoutReply)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithDocuments", "dev.inmo.tgbotapi.extensions.api.send.replyWithDocuments")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithDocumentsGroup(
|
||||
to: Message,
|
||||
media: List<DocumentMediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = replyWithDocuments(to, media, disableNotification, allowSendingWithoutReply)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithGallery", "dev.inmo.tgbotapi.extensions.api.send.replyWithGallery")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithVisualMediaGroup(
|
||||
to: Message,
|
||||
media: List<VisualMediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = replyWithGallery(to, media, disableNotification, allowSendingWithoutReply)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithMediaGroup", "dev.inmo.tgbotapi.extensions.api.send.replyWithMediaGroup")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
media: List<MediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null
|
||||
) = replyWithMediaGroup(to, media, disableNotification, allowSendingWithoutReply)
|
@ -1,8 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.send.reply
|
||||
import dev.inmo.tgbotapi.extensions.api.send.replyWithPhoto
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.requests.send.media.SendPhoto
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
@ -13,8 +11,11 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.files.Photo
|
||||
import dev.inmo.tgbotapi.types.files.biggest
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
fileId: InputFile,
|
||||
@ -37,6 +38,10 @@ suspend fun TelegramBot.sendPhoto(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
fileId: InputFile,
|
||||
@ -48,6 +53,10 @@ suspend fun TelegramBot.sendPhoto(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(chat.id, fileId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photo: Photo,
|
||||
@ -59,6 +68,10 @@ suspend fun TelegramBot.sendPhoto(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photo: Photo,
|
||||
@ -71,6 +84,10 @@ suspend fun TelegramBot.sendPhoto(
|
||||
) = sendPhoto(chat.id, photo, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
fileId: InputFile,
|
||||
@ -91,6 +108,10 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
fileId: InputFile,
|
||||
@ -101,6 +122,10 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(chat.id, fileId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photo: Photo,
|
||||
@ -111,6 +136,10 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
suspend inline fun TelegramBot.sendPhoto(
|
||||
chat: Chat,
|
||||
photo: Photo,
|
||||
@ -120,86 +149,3 @@ suspend inline fun TelegramBot.sendPhoto(
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = sendPhoto(chat.id, photo, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithPhoto", "dev.inmo.tgbotapi.extensions.api.send.replyWithPhoto")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithPhoto(
|
||||
to: Message,
|
||||
fileId: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithPhoto(to, fileId, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithPhoto(
|
||||
to: Message,
|
||||
photo: Photo,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, photo, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
photo: Photo,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, photo, text, parseMode, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("replyWithPhoto", "dev.inmo.tgbotapi.extensions.api.send.replyWithPhoto")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithPhoto(
|
||||
to: Message,
|
||||
fileId: InputFile,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = replyWithPhoto(to, fileId, entities, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.replyWithPhoto(
|
||||
to: Message,
|
||||
photo: Photo,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, photo, entities, disableNotification, allowSendingWithoutReply, replyMarkup)
|
||||
|
||||
@Deprecated(
|
||||
"Replaced",
|
||||
ReplaceWith("reply", "dev.inmo.tgbotapi.extensions.api.send.reply")
|
||||
)
|
||||
suspend inline fun TelegramBot.reply(
|
||||
to: Message,
|
||||
photo: Photo,
|
||||
entities: TextSourcesList,
|
||||
disableNotification: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = reply(to, photo, entities, disableNotification, allowSendingWithoutReply, replyMarkup)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user