mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-12-29 17:39:22 +00:00
Compare commits
59 Commits
v28.0.2
...
4068b46d29
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4068b46d29 | ||
| fb08b7044e | |||
| 7ed021b5bc | |||
| 1cff533265 | |||
| 8b08e11441 | |||
| b69c8f1d8f | |||
| fdf393405c | |||
| c951fc3353 | |||
| 02f42c3f52 | |||
| 0105e46a5f | |||
| 325a189ebb | |||
| 1d021c8450 | |||
| 6eb9379e0a | |||
| 2d97d10ee1 | |||
| 4b7d052ece | |||
| df512a917b | |||
| 67cd836466 | |||
| eb1fb16117 | |||
| ee4cf7c626 | |||
| 74d8b31437 | |||
| 3f61cfdefb | |||
| 91339fc839 | |||
| 2e23f48350 | |||
| f6211d33bb | |||
| 2ff11ad73c | |||
| 2695b03968 | |||
| 03d23a938e | |||
| 719fb1f4a9 | |||
| c3c69f3e7f | |||
| 4fb662c560 | |||
| cc967c2981 | |||
| aa7bf426f1 | |||
| 0b2735ca1e | |||
| 48bfa76b9e | |||
| 79a0e202d8 | |||
| 152bf2af02 | |||
| 0163e5ce8c | |||
| 62b4a21650 | |||
| f312e04c0d | |||
| 1c36c0a2f7 | |||
| bd73852253 | |||
| fbb2511fca | |||
| f22d571484 | |||
| 8101c4c9fb | |||
| 255416f72a | |||
| 6eb7563c70 | |||
| b9bdf7cc72 | |||
| 4a8e1ee7b7 | |||
| 23bfe02e6f | |||
| 658c19092c | |||
| ebc1c07404 | |||
| 989d33acb8 | |||
| 5aa6ac3320 | |||
| 048f65b8d4 | |||
| b69be31362 | |||
| b92288d7cc | |||
| 6c02d57197 | |||
| e977c865ea | |||
| 18b459fdf8 |
2
.github/workflows/packages_publishing.yml
vendored
2
.github/workflows/packages_publishing.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_USER: ${{ github.actor }}
|
GITHUB_USER: ${{ github.actor }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Publish to Gitea
|
- name: Publish to InmoNexus
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: ./gradlew publishAllPublicationsToInmoNexusRepository
|
run: ./gradlew publishAllPublicationsToInmoNexusRepository
|
||||||
env:
|
env:
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -1,5 +1,37 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 30.0.0
|
||||||
|
|
||||||
|
**THIS UPDATE MAY CONTAINS BREAKING CHANGES**
|
||||||
|
|
||||||
|
* `Version`:
|
||||||
|
* `Kotlin`: `2.2.10` -> `2.2.20`
|
||||||
|
* `Ktor`: `3.2.3` -> `3.3.1`
|
||||||
|
* `MicroUtils`: `0.26.3` -> `0.26.6`
|
||||||
|
* `KSLog`: `1.5.0` -> `1.5.1`
|
||||||
|
* `BehaviourBuilder`:
|
||||||
|
* `DefaultCustomBehaviourContextAndTypeReceiver` now extends `suspend (BC, U) -> R` instead of `CustomBehaviourContextAndTypeReceiver<BC, R, U>` (no changes in api in fact)
|
||||||
|
|
||||||
|
## 29.0.1
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Fix of [#917](https://github.com/InsanusMokrassar/ktgbotapi/issues/917): all `OrderInfo` fields now have defaults nulls
|
||||||
|
|
||||||
|
## 29.0.0
|
||||||
|
|
||||||
|
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.2](https://core.telegram.org/bots/api-changelog#august-15-2025)**
|
||||||
|
|
||||||
|
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Add function `firstOfOrNull(vararg suspend () -> T): T?`
|
||||||
|
* Change logic of `firstOf` - now it works based on merged flows and __do not require__ `CoroutineScope` as receiver
|
||||||
|
|
||||||
|
## 28.0.3
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Add passing of default engines in `HttpClient` constructors
|
||||||
|
|
||||||
## 28.0.2
|
## 28.0.2
|
||||||
|
|
||||||
* `Core`:
|
* `Core`:
|
||||||
@@ -13,7 +45,7 @@
|
|||||||
* `MicroUtils`: `0.26.2` -> `0.26.3`
|
* `MicroUtils`: `0.26.2` -> `0.26.3`
|
||||||
* `Ktor`: `3.2.2` -> `3.2.3`
|
* `Ktor`: `3.2.2` -> `3.2.3`
|
||||||
* `Core`:
|
* `Core`:
|
||||||
* Let all `OptionallyMessageThreadRequest` inheritors to use `@EncodeDefault` annotation to fix default value passing
|
* Let all `OptionallyMessageThreadRequest` inheritors to use `@EncodeDefault` annotation to fix default value passing
|
||||||
|
|
||||||
## 28.0.0
|
## 28.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#july-3-2025)
|
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#august-15-2025)
|
||||||
|
|
||||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != n
|
|||||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
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')
|
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||||
validationTimeout = Duration.ofSeconds(0)
|
validationTimeout = Duration.ofSeconds(0)
|
||||||
publishingType = "USER_MANAGED"
|
publishingType = System.getenv('PUBLISHING_TYPE') != "" ? System.getenv('PUBLISHING_TYPE') : "USER_MANAGED"
|
||||||
}
|
}
|
||||||
|
|
||||||
publishAllProjectsProbablyBreakingProjectIsolation()
|
publishAllProjectsProbablyBreakingProjectIsolation()
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ kotlin.incremental.js=true
|
|||||||
ksp.useKSP2=false
|
ksp.useKSP2=false
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=28.0.2
|
library_version=30.0.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "2.2.10"
|
kotlin = "2.2.20"
|
||||||
kotlin-serialization = "1.9.0"
|
kotlin-serialization = "1.9.0"
|
||||||
kotlin-coroutines = "1.10.2"
|
kotlin-coroutines = "1.10.2"
|
||||||
|
|
||||||
@@ -8,21 +8,21 @@ javax-activation = "1.1.1"
|
|||||||
|
|
||||||
korlibs = "5.4.0"
|
korlibs = "5.4.0"
|
||||||
uuid = "0.8.4"
|
uuid = "0.8.4"
|
||||||
ktor = "3.2.3"
|
ktor = "3.3.1"
|
||||||
|
|
||||||
ksp = "2.2.10-2.0.2"
|
ksp = "2.2.20-2.0.4"
|
||||||
kotlin-poet = "2.2.0"
|
kotlin-poet = "2.2.0"
|
||||||
|
|
||||||
microutils = "0.26.3"
|
microutils = "0.26.6"
|
||||||
kslog = "1.5.0"
|
kslog = "1.5.1"
|
||||||
|
|
||||||
versions = "0.52.0"
|
versions = "0.53.0"
|
||||||
|
|
||||||
github-release-plugin = "2.5.2"
|
github-release-plugin = "2.5.2"
|
||||||
dokka = "2.0.0"
|
dokka = "2.0.0"
|
||||||
|
|
||||||
validator = "0.18.1"
|
validator = "0.18.1"
|
||||||
nmcp = "1.1.0"
|
nmcp = "1.2.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
@@ -37,6 +37,8 @@ kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref =
|
|||||||
|
|
||||||
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
|
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
|
||||||
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
|
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
|
||||||
|
ktor-client-java = { module = "io.ktor:ktor-client-java", version.ref = "ktor" }
|
||||||
|
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
|
||||||
ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktor" }
|
ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktor" }
|
||||||
ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" }
|
ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" }
|
||||||
ktor-server = { module = "io.ktor:ktor-server", version.ref = "ktor" }
|
ktor-server = { module = "io.ktor:ktor-server", version.ref = "ktor" }
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
|
||||||
|
|||||||
317
gradlew
vendored
317
gradlew
vendored
@@ -1,78 +1,129 @@
|
|||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# This is normally unused
|
||||||
APP_BASE_NAME=`basename "$0"`
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
DEFAULT_JVM_OPTS=""
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn ( ) {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die ( ) {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
@@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
ulimit -n $MAX_FD
|
warn "Could not query maximum file descriptor limit"
|
||||||
if [ $? -ne 0 ] ; then
|
esac
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
case $MAX_FD in #(
|
||||||
fi
|
'' | soft) :;; #(
|
||||||
else
|
*)
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
fi
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
|
||||||
if $cygwin ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=$((i+1))
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
(0) set -- ;;
|
|
||||||
(1) set -- "$args0" ;;
|
|
||||||
(2) set -- "$args0" "$args1" ;;
|
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save ( ) {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=$(save "$@")
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
80
gradlew.bat
vendored
80
gradlew.bat
vendored
@@ -1,4 +1,22 @@
|
|||||||
@if "%DEBUG%" == "" @echo off
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -9,25 +27,29 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS=
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -35,48 +57,36 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.extensions.api
|
|||||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
|
import dev.inmo.tgbotapi.utils.defaultKtorEngine
|
||||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.HttpClient
|
||||||
import io.ktor.client.HttpClientConfig
|
import io.ktor.client.HttpClientConfig
|
||||||
@@ -13,7 +14,7 @@ import io.ktor.client.engine.*
|
|||||||
*/
|
*/
|
||||||
public fun telegramBot(
|
public fun telegramBot(
|
||||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||||
client: HttpClient = HttpClient()
|
client: HttpClient = HttpClient(defaultKtorEngine)
|
||||||
): TelegramBot = telegramBot(urlsKeeper) {
|
): TelegramBot = telegramBot(urlsKeeper) {
|
||||||
this.client = client
|
this.client = client
|
||||||
}
|
}
|
||||||
@@ -68,7 +69,7 @@ public fun telegramBot(
|
|||||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||||
testServer: Boolean = false,
|
testServer: Boolean = false,
|
||||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||||
client: HttpClient = HttpClient()
|
client: HttpClient = HttpClient(defaultKtorEngine)
|
||||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper), client)
|
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper), client)
|
||||||
|
|
||||||
@Suppress("NOTHING_TO_INLINE")
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ package dev.inmo.tgbotapi.extensions.api
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.ForwardMessage
|
import dev.inmo.tgbotapi.requests.ForwardMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.DirectMessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.MessageId
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.Seconds
|
import dev.inmo.tgbotapi.types.Seconds
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
||||||
|
import dev.inmo.tgbotapi.types.directMessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.threadId
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
@@ -16,11 +18,12 @@ public suspend fun TelegramBot.forwardMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = execute(
|
): PossiblyForwardedMessage = execute(
|
||||||
ForwardMessage(fromChatId, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
ForwardMessage(fromChatId, toChatId, messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
)
|
)
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
@@ -28,45 +31,50 @@ public suspend fun TelegramBot.forwardMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
message: AccessibleMessage,
|
message: AccessibleMessage,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
|
|
||||||
public suspend fun TelegramBot.forwardMessage(
|
public suspend fun TelegramBot.forwardMessage(
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
message: AccessibleMessage,
|
message: AccessibleMessage,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, directMessageThreadId, startTimestamp, disableNotification, protectContent)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: List<MessageId>,
|
messageIds: List<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -23,6 +24,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = it,
|
messageIds = it,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -35,6 +37,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -43,6 +46,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds.toList(),
|
messageIds = messageIds.toList(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -52,6 +56,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messagesMetas: List<Message.MetaInfo>,
|
messagesMetas: List<Message.MetaInfo>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -61,6 +66,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
fromChatId = chatId,
|
fromChatId = chatId,
|
||||||
messageIds = messages.map { it.messageId },
|
messageIds = messages.map { it.messageId },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -72,6 +78,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messages: List<AccessibleMessage>,
|
messages: List<AccessibleMessage>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -79,6 +86,7 @@ public suspend fun TelegramBot.forwardMessages(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messagesMetas = messages.map { it.metaInfo },
|
messagesMetas = messages.map { it.metaInfo },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -89,6 +97,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: List<MessageId>,
|
messageIds: List<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -97,6 +106,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds,
|
messageIds = messageIds,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -107,6 +117,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -115,6 +126,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds,
|
messageIds = messageIds,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -124,6 +136,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messagesMetas: List<Message.MetaInfo>,
|
messagesMetas: List<Message.MetaInfo>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -131,6 +144,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messagesMetas = messagesMetas,
|
messagesMetas = messagesMetas,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -141,6 +155,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messages: List<AccessibleMessage>,
|
messages: List<AccessibleMessage>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -148,6 +163,7 @@ public suspend fun TelegramBot.forward(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messages = messages,
|
messages = messages,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
|
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
@@ -50,11 +51,13 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
locationsFlow: Flow<EditLiveLocationInfo>,
|
locationsFlow: Flow<EditLiveLocationInfo>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
) {
|
) {
|
||||||
@@ -76,25 +79,27 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
if (capturedLiveLocationMessage == null) {
|
if (capturedLiveLocationMessage == null) {
|
||||||
updateMessageJob ?.start()
|
updateMessageJob ?.start()
|
||||||
currentLiveLocationMessage = send(
|
currentLiveLocationMessage = send(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
it.latitude,
|
latitude = it.latitude,
|
||||||
it.longitude,
|
longitude = it.longitude,
|
||||||
if (liveTimeMillis == indefiniteLivePeriodDelayMillis) {
|
livePeriod = if (liveTimeMillis == indefiniteLivePeriodDelayMillis) {
|
||||||
LiveLocation.INDEFINITE_LIVE_PERIOD
|
LiveLocation.INDEFINITE_LIVE_PERIOD
|
||||||
} else {
|
} else {
|
||||||
ceil(liveTimeMillis.toDouble() / 1000).toInt()
|
ceil(liveTimeMillis.toDouble() / 1000).toInt()
|
||||||
},
|
},
|
||||||
it.horizontalAccuracy,
|
horizontalAccuracy = it.horizontalAccuracy,
|
||||||
it.heading,
|
heading = it.heading,
|
||||||
it.proximityAlertRadius,
|
proximityAlertRadius = it.proximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification,
|
businessConnectionId = businessConnectionId,
|
||||||
protectContent,
|
disableNotification = disableNotification,
|
||||||
allowPaidBroadcast,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
it.replyMarkup
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = it.replyMarkup
|
||||||
).also {
|
).also {
|
||||||
sentMessageFlow ?.emit(it)
|
sentMessageFlow ?.emit(it)
|
||||||
}
|
}
|
||||||
@@ -125,11 +130,13 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
locationsFlow: Flow<Location>,
|
locationsFlow: Flow<Location>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
) {
|
) {
|
||||||
@@ -147,11 +154,13 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
},
|
},
|
||||||
liveTimeMillis = liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
sentMessageFlow = sentMessageFlow
|
sentMessageFlow = sentMessageFlow
|
||||||
)
|
)
|
||||||
@@ -168,11 +177,13 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
locationsFlow: Flow<Pair<Double, Double>>,
|
locationsFlow: Flow<Pair<Double, Double>>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
) {
|
) {
|
||||||
@@ -186,11 +197,13 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
},
|
},
|
||||||
liveTimeMillis = liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
sentMessageFlow = sentMessageFlow
|
sentMessageFlow = sentMessageFlow
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api
|
package dev.inmo.tgbotapi.extensions.api
|
||||||
|
|
||||||
import korlibs.time.DateTime
|
import korlibs.time.DateTime
|
||||||
@@ -11,11 +13,13 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
|
import dev.inmo.tgbotapi.utils.extensions.directMessageThreadIdOrNull
|
||||||
import dev.inmo.tgbotapi.utils.extensions.threadIdOrNull
|
import dev.inmo.tgbotapi.utils.extensions.threadIdOrNull
|
||||||
import io.ktor.utils.io.core.Closeable
|
import io.ktor.utils.io.core.Closeable
|
||||||
import korlibs.time.millisecondsLong
|
import korlibs.time.millisecondsLong
|
||||||
@@ -96,11 +100,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider {
|
): LiveLocationProvider {
|
||||||
@@ -115,11 +121,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
heading = initHeading,
|
heading = initHeading,
|
||||||
proximityAlertRadius = initProximityAlertRadius,
|
proximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -147,11 +155,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
@@ -164,11 +174,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading = initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius = initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -186,11 +198,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
@@ -203,11 +217,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading = initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius = initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -225,11 +241,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
@@ -242,11 +260,13 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading = initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius = initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -265,11 +285,13 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = to.threadIdOrNull,
|
threadId: MessageThreadId? = to.threadIdOrNull,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = to.directMessageThreadIdOrNull,
|
||||||
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
@@ -282,11 +304,13 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading = initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius = initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -304,11 +328,13 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = to.threadIdOrNull,
|
threadId: MessageThreadId? = to.threadIdOrNull,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = to.directMessageThreadIdOrNull,
|
||||||
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
@@ -320,11 +346,13 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading = initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius = initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.PromoteChannelAdministrator
|
import dev.inmo.tgbotapi.requests.chat.members.PromoteChannelAdministrator
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
|
||||||
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.TelegramDate
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
@@ -26,7 +25,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat: Boolean? = null,
|
canManageChat: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null,
|
||||||
): Boolean = execute(
|
): Boolean = execute(
|
||||||
PromoteChannelAdministrator(
|
PromoteChannelAdministrator(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
@@ -44,7 +44,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat = canManageChat,
|
canManageChat = canManageChat,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,7 +65,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat: Boolean? = null,
|
canManageChat: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null,
|
||||||
): Boolean = promoteChannelAdministrator(
|
): Boolean = promoteChannelAdministrator(
|
||||||
chat.id,
|
chat.id,
|
||||||
userId,
|
userId,
|
||||||
@@ -81,7 +83,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat = canManageChat,
|
canManageChat = canManageChat,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|
||||||
public suspend fun TelegramBot.promoteChannelAdministrator(
|
public suspend fun TelegramBot.promoteChannelAdministrator(
|
||||||
@@ -100,7 +103,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat: Boolean? = null,
|
canManageChat: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null,
|
||||||
): Boolean = promoteChannelAdministrator(
|
): Boolean = promoteChannelAdministrator(
|
||||||
chatId,
|
chatId,
|
||||||
user.id,
|
user.id,
|
||||||
@@ -117,7 +121,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat = canManageChat,
|
canManageChat = canManageChat,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|
||||||
public suspend fun TelegramBot.promoteChannelAdministrator(
|
public suspend fun TelegramBot.promoteChannelAdministrator(
|
||||||
@@ -136,7 +141,8 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat: Boolean? = null,
|
canManageChat: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null,
|
||||||
): Boolean = promoteChannelAdministrator(
|
): Boolean = promoteChannelAdministrator(
|
||||||
chat.id,
|
chat.id,
|
||||||
user.id,
|
user.id,
|
||||||
@@ -153,5 +159,6 @@ public suspend fun TelegramBot.promoteChannelAdministrator(
|
|||||||
canManageChat = canManageChat,
|
canManageChat = canManageChat,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics: Boolean? = null,
|
canManageTopics: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null
|
||||||
): Boolean = execute(
|
): Boolean = execute(
|
||||||
PromoteChatMember(
|
PromoteChatMember(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
@@ -46,7 +47,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics = canManageTopics,
|
canManageTopics = canManageTopics,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -69,7 +71,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics: Boolean? = null,
|
canManageTopics: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null
|
||||||
): Boolean = promoteChatMember(
|
): Boolean = promoteChatMember(
|
||||||
chat.id,
|
chat.id,
|
||||||
userId,
|
userId,
|
||||||
@@ -88,7 +91,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics = canManageTopics,
|
canManageTopics = canManageTopics,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Warning("This method is too common. Use it with caution")
|
@Warning("This method is too common. Use it with caution")
|
||||||
@@ -110,7 +114,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics: Boolean? = null,
|
canManageTopics: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null
|
||||||
): Boolean = promoteChatMember(
|
): Boolean = promoteChatMember(
|
||||||
chatId,
|
chatId,
|
||||||
user.id,
|
user.id,
|
||||||
@@ -129,7 +134,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics = canManageTopics,
|
canManageTopics = canManageTopics,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Warning("This method is too common. Use it with caution")
|
@Warning("This method is too common. Use it with caution")
|
||||||
@@ -151,7 +157,8 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics: Boolean? = null,
|
canManageTopics: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null
|
||||||
): Boolean = promoteChatMember(
|
): Boolean = promoteChatMember(
|
||||||
chat.id,
|
chat.id,
|
||||||
user.id,
|
user.id,
|
||||||
@@ -170,5 +177,6 @@ public suspend fun TelegramBot.promoteChatMember(
|
|||||||
canManageTopics = canManageTopics,
|
canManageTopics = canManageTopics,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send
|
package dev.inmo.tgbotapi.extensions.api.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -5,6 +7,7 @@ import dev.inmo.tgbotapi.requests.send.CopyMessage
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||||
@@ -21,10 +24,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = execute(
|
): MessageId = execute(
|
||||||
@@ -36,10 +41,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -57,10 +64,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -71,10 +80,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -91,10 +102,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -105,10 +118,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -125,10 +140,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -139,10 +156,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -159,10 +178,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = execute(
|
): MessageId = execute(
|
||||||
@@ -173,10 +194,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -193,10 +216,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -206,10 +231,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -225,10 +252,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -238,10 +267,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -257,10 +288,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -270,10 +303,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -289,10 +324,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -303,10 +340,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -322,10 +361,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -336,10 +377,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -354,10 +397,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -367,10 +412,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -385,10 +432,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChat.id.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
@@ -398,263 +447,12 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChatId: ChatIdentifier,
|
|
||||||
// fromChatId: ChatIdentifier,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// text: String? = null,
|
|
||||||
// parseMode: ParseMode? = null,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = execute(
|
|
||||||
// CopyMessage(
|
|
||||||
// fromChatId,
|
|
||||||
// messageId,
|
|
||||||
// toChatId,
|
|
||||||
// text,
|
|
||||||
// parseMode,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChatId: ChatIdentifier,
|
|
||||||
// fromChat: Chat,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// text: String? = null,
|
|
||||||
// parseMode: ParseMode? = null,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChatId,
|
|
||||||
// fromChat.id,
|
|
||||||
// messageId,
|
|
||||||
// text,
|
|
||||||
// parseMode,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChat: Chat,
|
|
||||||
// fromChatId: ChatIdentifier,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// text: String? = null,
|
|
||||||
// parseMode: ParseMode? = null,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChat.id,
|
|
||||||
// fromChatId,
|
|
||||||
// messageId,
|
|
||||||
// text,
|
|
||||||
// parseMode,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChat: Chat,
|
|
||||||
// fromChat: Chat,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// text: String? = null,
|
|
||||||
// parseMode: ParseMode? = null,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChat.id,
|
|
||||||
// fromChat.id,
|
|
||||||
// messageId,
|
|
||||||
// text,
|
|
||||||
// parseMode,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChatId: ChatIdentifier,
|
|
||||||
// fromChatId: ChatIdentifier,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// entities: TextSourcesList,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = execute(
|
|
||||||
// CopyMessage(
|
|
||||||
// fromChatId,
|
|
||||||
// messageId,
|
|
||||||
// toChatId,
|
|
||||||
// entities,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChatId: ChatIdentifier,
|
|
||||||
// fromChat: Chat,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// entities: TextSourcesList,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChatId,
|
|
||||||
// fromChat.id,
|
|
||||||
// messageId,
|
|
||||||
// entities,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChat: Chat,
|
|
||||||
// fromChatId: ChatIdentifier,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// entities: TextSourcesList,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChat.id,
|
|
||||||
// fromChatId,
|
|
||||||
// messageId,
|
|
||||||
// entities,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// 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
|
|
||||||
// */
|
|
||||||
//public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
// toChat: Chat,
|
|
||||||
// fromChat: Chat,
|
|
||||||
// messageId: MessageId,
|
|
||||||
// entities: TextSourcesList,
|
|
||||||
// showCaptionAboveMedia: Boolean = false,
|
|
||||||
// threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
// disableNotification: Boolean = false,
|
|
||||||
// protectContent: Boolean = false,
|
|
||||||
// allowPaidBroadcast: Boolean = false,
|
|
||||||
// replyParameters: ReplyParameters? = null,
|
|
||||||
// replyMarkup: KeyboardMarkup? = null
|
|
||||||
//): MessageId = copyMessage(
|
|
||||||
// toChat.id,
|
|
||||||
// fromChat.id,
|
|
||||||
// messageId,
|
|
||||||
// entities,
|
|
||||||
// showCaptionAboveMedia,
|
|
||||||
// threadId,
|
|
||||||
// disableNotification,
|
|
||||||
// protectContent,
|
|
||||||
// allowPaidBroadcast,
|
|
||||||
// replyParameters,
|
|
||||||
// replyMarkup
|
|
||||||
//)
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: List<MessageId>,
|
messageIds: List<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -22,6 +23,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = it,
|
messageIds = it,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -34,6 +36,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -42,6 +45,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds.toList(),
|
messageIds = messageIds.toList(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -51,6 +55,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messagesMetas: List<Message.MetaInfo>,
|
messagesMetas: List<Message.MetaInfo>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -60,6 +65,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
fromChatId = chatId,
|
fromChatId = chatId,
|
||||||
messageIds = messages.map { it.messageId },
|
messageIds = messages.map { it.messageId },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -71,6 +77,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messages: List<AccessibleMessage>,
|
messages: List<AccessibleMessage>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -78,6 +85,7 @@ public suspend fun TelegramBot.copyMessages(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messagesMetas = messages.map { it.metaInfo },
|
messagesMetas = messages.map { it.metaInfo },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -88,6 +96,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: List<MessageId>,
|
messageIds: List<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -96,6 +105,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds,
|
messageIds = messageIds,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -106,6 +116,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -114,6 +125,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds,
|
messageIds = messageIds,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -123,6 +135,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messagesMetas: List<Message.MetaInfo>,
|
messagesMetas: List<Message.MetaInfo>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -130,6 +143,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messagesMetas = messagesMetas,
|
messagesMetas = messagesMetas,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -140,6 +154,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messages: List<AccessibleMessage>,
|
messages: List<AccessibleMessage>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -147,6 +162,7 @@ public suspend fun TelegramBot.copy(
|
|||||||
toChatId = toChatId,
|
toChatId = toChatId,
|
||||||
messages = messages,
|
messages = messages,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,12 @@ package dev.inmo.tgbotapi.extensions.api.send
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.MessageContent
|
import dev.inmo.tgbotapi.types.message.content.MessageContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will send [content] to the [chatId] as is
|
* This method will send [content] to the [chatId] as is
|
||||||
@@ -15,22 +17,28 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
content: T,
|
content: T,
|
||||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null
|
||||||
): ContentMessage<T> = execute(
|
): ContentMessage<T> = execute(
|
||||||
content.createResend(
|
content.createResend(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
)
|
)
|
||||||
) as ContentMessage<T>
|
) as ContentMessage<T>
|
||||||
|
|
||||||
@@ -41,6 +49,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
content: T,
|
content: T,
|
||||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
@@ -51,6 +61,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
content = content,
|
content = content,
|
||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
@@ -68,6 +80,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
message: ContentMessage<T>,
|
message: ContentMessage<T>,
|
||||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
@@ -78,6 +92,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
content = message.content,
|
content = message.content,
|
||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
@@ -95,6 +111,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
message: ContentMessage<T>,
|
message: ContentMessage<T>,
|
||||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
@@ -105,6 +123,8 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
message = message,
|
message = message,
|
||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send
|
package dev.inmo.tgbotapi.extensions.api.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -6,6 +8,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||||
|
|
||||||
@@ -19,11 +22,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = execute(
|
): ContentMessage<ContactContent> = execute(
|
||||||
@@ -33,11 +38,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
firstName = firstName,
|
firstName = firstName,
|
||||||
lastName = lastName,
|
lastName = lastName,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -51,11 +58,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = execute(
|
): ContentMessage<ContactContent> = execute(
|
||||||
@@ -63,11 +72,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
contact = contact,
|
contact = contact,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -83,11 +94,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = sendContact(
|
): ContentMessage<ContactContent> = sendContact(
|
||||||
@@ -96,11 +109,13 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
firstName = firstName,
|
firstName = firstName,
|
||||||
lastName = lastName,
|
lastName = lastName,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -113,22 +128,26 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = sendContact(
|
): ContentMessage<ContactContent> = sendContact(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
contact = contact,
|
contact = contact,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
||||||
@@ -18,11 +19,13 @@ public suspend fun TelegramBot.sendDice(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<DiceContent> = execute(
|
): ContentMessage<DiceContent> = execute(
|
||||||
@@ -30,11 +33,13 @@ public suspend fun TelegramBot.sendDice(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
animationType = animationType,
|
animationType = animationType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -48,22 +53,26 @@ public suspend fun TelegramBot.sendDice(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<DiceContent> = sendDice(
|
): ContentMessage<DiceContent> = sendDice(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
animationType = animationType,
|
animationType = animationType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
|
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
|
||||||
@@ -24,11 +25,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = execute(
|
): ContentMessage<LiveLocationContent> = execute(
|
||||||
@@ -41,11 +44,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -63,11 +68,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -79,11 +86,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -101,11 +110,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -117,11 +128,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -138,11 +151,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -154,11 +169,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -176,11 +193,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -192,11 +211,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -213,11 +234,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -229,11 +252,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -251,11 +276,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -267,11 +294,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -288,11 +317,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
@@ -304,11 +335,13 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send
|
package dev.inmo.tgbotapi.extensions.api.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -6,6 +8,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
@@ -24,11 +27,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = execute(
|
): ContentMessage<TextContent> = execute(
|
||||||
@@ -38,11 +43,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -58,11 +65,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
@@ -71,11 +80,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -90,11 +101,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendTextMessage(
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
@@ -103,11 +116,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -123,11 +138,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
@@ -136,11 +153,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -154,11 +173,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = execute(
|
): ContentMessage<TextContent> = execute(
|
||||||
@@ -167,11 +188,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -186,11 +209,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -199,11 +224,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -218,11 +245,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
separator: String,
|
separator: String,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -231,11 +260,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -249,11 +280,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
@@ -261,11 +294,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -279,11 +314,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -292,11 +329,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -311,11 +350,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
separator: String,
|
separator: String,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -324,11 +365,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -342,11 +385,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
@@ -354,11 +399,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -372,11 +419,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -385,11 +434,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -404,11 +455,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
separator: String,
|
separator: String,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -417,11 +470,13 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -436,11 +491,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendTextMessage(
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
@@ -448,11 +505,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -466,11 +525,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -479,11 +540,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -498,11 +561,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
separator: String,
|
separator: String,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
@@ -511,11 +576,13 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities = buildEntities(separator, builderBody),
|
entities = buildEntities(separator, builderBody),
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send
|
package dev.inmo.tgbotapi.extensions.api.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -6,6 +8,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
@@ -20,11 +23,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = execute(
|
): ContentMessage<StaticLocationContent> = execute(
|
||||||
@@ -33,11 +38,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -51,11 +58,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -63,11 +72,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude = location.latitude,
|
latitude = location.latitude,
|
||||||
longitude = location.longitude,
|
longitude = location.longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -81,11 +92,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -93,11 +106,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -110,11 +125,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -122,11 +139,13 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
latitude = location.latitude,
|
latitude = location.latitude,
|
||||||
longitude = location.longitude,
|
longitude = location.longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -140,11 +159,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -152,11 +173,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -169,11 +192,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -181,11 +206,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude = location.latitude,
|
latitude = location.latitude,
|
||||||
longitude = location.longitude,
|
longitude = location.longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -199,11 +226,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -211,11 +240,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -228,11 +259,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
@@ -240,11 +273,13 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude = location.latitude,
|
latitude = location.latitude,
|
||||||
longitude = location.longitude,
|
longitude = location.longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send
|
package dev.inmo.tgbotapi.extensions.api.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -6,6 +8,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.VenueContent
|
import dev.inmo.tgbotapi.types.message.content.VenueContent
|
||||||
@@ -26,11 +29,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = execute(
|
): ContentMessage<VenueContent> = execute(
|
||||||
@@ -45,11 +50,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -70,11 +77,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = sendVenue(
|
): ContentMessage<VenueContent> = sendVenue(
|
||||||
@@ -88,11 +97,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -111,11 +122,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = sendVenue(
|
): ContentMessage<VenueContent> = sendVenue(
|
||||||
@@ -129,11 +142,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -152,11 +167,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = sendVenue(
|
): ContentMessage<VenueContent> = sendVenue(
|
||||||
@@ -170,11 +187,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -187,11 +206,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = execute(
|
): ContentMessage<VenueContent> = execute(
|
||||||
@@ -199,11 +220,13 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
venue = venue,
|
venue = venue,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -217,22 +240,26 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VenueContent> = sendVenue(
|
): ContentMessage<VenueContent> = sendVenue(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
venue = venue,
|
venue = venue,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.games.Game
|
import dev.inmo.tgbotapi.types.games.Game
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||||
@@ -18,11 +19,13 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = execute(
|
): ContentMessage<GameContent> = execute(
|
||||||
@@ -30,11 +33,13 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
gameShortName = gameShortName,
|
gameShortName = gameShortName,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -48,22 +53,26 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
gameShortName = gameShortName,
|
gameShortName = gameShortName,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -76,22 +85,26 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
gameShortName = game.title,
|
gameShortName = game.title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -104,22 +117,26 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
gameShortName = game.title,
|
gameShortName = game.title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -7,6 +9,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AnimationFile
|
import dev.inmo.tgbotapi.types.files.AnimationFile
|
||||||
@@ -29,11 +32,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = execute(
|
): ContentMessage<AnimationContent> = execute(
|
||||||
@@ -49,11 +54,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -74,11 +81,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -93,11 +102,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -118,11 +129,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -137,11 +150,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -161,11 +176,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -179,11 +196,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -204,11 +223,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = execute(
|
): ContentMessage<AnimationContent> = execute(
|
||||||
@@ -223,11 +244,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -247,11 +270,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -265,11 +290,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -289,11 +316,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -307,11 +336,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -330,11 +361,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AnimationContent> = sendAnimation(
|
): ContentMessage<AnimationContent> = sendAnimation(
|
||||||
@@ -347,11 +380,13 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||||
@@ -27,11 +28,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = execute(
|
): ContentMessage<AudioContent> = execute(
|
||||||
@@ -45,11 +48,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -69,11 +74,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -86,11 +93,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -106,11 +115,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -123,11 +134,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
performer = audio.performer,
|
performer = audio.performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -143,11 +156,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -157,11 +172,13 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -180,11 +197,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = execute(
|
): ContentMessage<AudioContent> = execute(
|
||||||
@@ -197,11 +216,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -220,11 +241,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -236,11 +259,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -255,11 +280,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -271,11 +298,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer = audio.performer,
|
performer = audio.performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -290,11 +319,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
@@ -303,11 +334,13 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||||
@@ -24,11 +25,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -40,11 +43,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text = text,
|
text = text,
|
||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -62,11 +67,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -77,11 +84,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text = text,
|
text = text,
|
||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -97,11 +106,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -112,11 +123,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text = text,
|
text = text,
|
||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -132,11 +145,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -146,11 +161,13 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
text = text,
|
text = text,
|
||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -166,11 +183,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -181,11 +200,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumbnail = thumb,
|
thumbnail = thumb,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -202,11 +223,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -216,11 +239,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb = thumb,
|
thumb = thumb,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -235,11 +260,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -249,11 +276,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb = document.thumbnail ?.fileId,
|
thumb = document.thumbnail ?.fileId,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -268,11 +297,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -281,11 +312,13 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
document = document,
|
document = document,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.media.*
|
|||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.*
|
import dev.inmo.tgbotapi.types.message.content.*
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlin.jvm.JvmName
|
import kotlin.jvm.JvmName
|
||||||
|
|
||||||
@@ -19,22 +20,26 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
|
||||||
SendMediaGroup<MediaGroupPartContent>(
|
SendMediaGroup<MediaGroupPartContent>(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -47,21 +52,25 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -74,21 +83,25 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -101,21 +114,25 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -126,22 +143,26 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = execute(
|
): ContentMessage<MediaGroupContent<AudioContent>> = execute(
|
||||||
SendPlaylist(
|
SendPlaylist(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -153,21 +174,25 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -179,21 +204,25 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -205,21 +234,25 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -230,22 +263,26 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
|
||||||
SendDocumentsGroup(
|
SendDocumentsGroup(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -257,21 +294,25 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -283,21 +324,25 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -309,21 +354,25 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -334,22 +383,26 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
|
||||||
SendVisualMediaGroup(
|
SendVisualMediaGroup(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -361,21 +414,25 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -387,21 +444,25 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -413,20 +474,24 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -6,6 +8,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia
|
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia
|
||||||
@@ -25,10 +28,12 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||||
@@ -41,10 +46,12 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
payload = payload,
|
payload = payload,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -63,10 +70,12 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||||
@@ -78,10 +87,12 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
payload = payload,
|
payload = payload,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -99,10 +110,12 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||||
@@ -114,10 +127,12 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
payload = payload,
|
payload = payload,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -135,10 +150,12 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||||
@@ -149,10 +166,12 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
payload = payload,
|
payload = payload,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -7,6 +9,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.*
|
import dev.inmo.tgbotapi.types.files.*
|
||||||
@@ -25,11 +28,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = execute(
|
): ContentMessage<PhotoContent> = execute(
|
||||||
@@ -41,11 +46,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -63,11 +70,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -78,11 +87,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -99,11 +110,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -114,11 +127,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -135,11 +150,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -150,11 +167,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -171,11 +190,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -186,11 +207,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -207,11 +230,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -222,11 +247,13 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -243,11 +270,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = execute(
|
): ContentMessage<PhotoContent> = execute(
|
||||||
@@ -258,11 +287,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -279,11 +310,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -293,11 +326,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -313,11 +348,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -327,11 +364,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -347,11 +386,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -361,11 +402,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -381,11 +424,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -395,11 +440,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -415,11 +462,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PhotoContent> = sendPhoto(
|
): ContentMessage<PhotoContent> = sendPhoto(
|
||||||
@@ -429,11 +478,13 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -10,6 +12,7 @@ import dev.inmo.tgbotapi.types.chat.Chat
|
|||||||
import dev.inmo.tgbotapi.types.files.Sticker
|
import dev.inmo.tgbotapi.types.files.Sticker
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@@ -19,12 +22,14 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = execute(
|
): ContentMessage<StickerContent> = execute(
|
||||||
@@ -32,12 +37,14 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
sticker = sticker,
|
sticker = sticker,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -51,24 +58,28 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
sticker = sticker,
|
sticker = sticker,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -81,24 +92,28 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
sticker = sticker.fileId,
|
sticker = sticker.fileId,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -111,24 +126,28 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
chat = chat,
|
chat = chat,
|
||||||
sticker = sticker.fileId,
|
sticker = sticker.fileId,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.media
|
package dev.inmo.tgbotapi.extensions.api.send.media
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -7,6 +9,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VideoFile
|
import dev.inmo.tgbotapi.types.files.VideoFile
|
||||||
@@ -31,11 +34,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = execute(
|
): ContentMessage<VideoContent> = execute(
|
||||||
@@ -54,11 +59,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
height = height,
|
height = height,
|
||||||
supportStreaming = null,
|
supportStreaming = null,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -76,11 +83,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -97,11 +106,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
width = video.width,
|
width = video.width,
|
||||||
height = video.height,
|
height = video.height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -124,11 +135,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -145,11 +158,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -167,11 +182,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -182,11 +199,13 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -208,11 +227,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = execute(
|
): ContentMessage<VideoContent> = execute(
|
||||||
@@ -230,11 +251,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
height = height,
|
height = height,
|
||||||
supportStreaming = null,
|
supportStreaming = null,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -251,11 +274,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -271,11 +296,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
width = video.width,
|
width = video.width,
|
||||||
height = video.height,
|
height = video.height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -297,11 +324,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -317,11 +346,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -338,11 +369,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoContent> = sendVideo(
|
): ContentMessage<VideoContent> = sendVideo(
|
||||||
@@ -352,11 +385,13 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
|
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
|
||||||
@@ -22,11 +23,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = execute(
|
): ContentMessage<VideoNoteContent> = execute(
|
||||||
@@ -37,11 +40,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration = duration,
|
duration = duration,
|
||||||
size = size,
|
size = size,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -55,11 +60,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
@@ -69,11 +76,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration = videoNote.duration,
|
duration = videoNote.duration,
|
||||||
size = videoNote.width,
|
size = videoNote.width,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -89,11 +98,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
@@ -103,11 +114,13 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration = duration,
|
duration = duration,
|
||||||
size = size,
|
size = size,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -120,22 +133,26 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
videoNote = videoNote,
|
videoNote = videoNote,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||||
@@ -24,11 +25,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = execute(
|
): ContentMessage<VoiceContent> = execute(
|
||||||
@@ -39,11 +42,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
duration = duration,
|
duration = duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -60,11 +65,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -74,11 +81,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
duration = duration,
|
duration = duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -93,11 +102,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -107,11 +118,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
duration = voice.duration,
|
duration = voice.duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -126,11 +139,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -139,11 +154,13 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
text = text,
|
text = text,
|
||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -159,11 +176,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = execute(
|
): ContentMessage<VoiceContent> = execute(
|
||||||
@@ -172,12 +191,14 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice = voice,
|
voice = voice,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
duration = duration,
|
duration = duration,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -193,11 +214,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -206,11 +229,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
duration = duration,
|
duration = duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -224,11 +249,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -237,11 +264,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities = entities,
|
entities = entities,
|
||||||
duration = voice.duration,
|
duration = voice.duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -254,11 +283,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chat.id.threadId,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
@@ -266,11 +297,13 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice = voice,
|
voice = voice,
|
||||||
entities = entities,
|
entities = entities,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:Suppress("KDocUnresolvedReference")
|
||||||
|
|
||||||
package dev.inmo.tgbotapi.extensions.api.send.payments
|
package dev.inmo.tgbotapi.extensions.api.send.payments
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
@@ -5,11 +7,11 @@ import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
||||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
@@ -35,10 +37,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = execute(
|
): ContentMessage<InvoiceContent> = execute(
|
||||||
@@ -62,10 +66,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||||
priceDependOnShipAddress = priceDependOnShipAddress,
|
priceDependOnShipAddress = priceDependOnShipAddress,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -98,6 +104,7 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = sendInvoice(
|
): ContentMessage<InvoiceContent> = sendInvoice(
|
||||||
@@ -120,10 +127,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||||
priceDependOnShipAddress = priceDependOnShipAddress,
|
priceDependOnShipAddress = priceDependOnShipAddress,
|
||||||
threadId = null,
|
threadId = null,
|
||||||
|
directMessageThreadId = null,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -142,10 +151,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
startParameter: StartParameter? = null,
|
startParameter: StartParameter? = null,
|
||||||
providerData: String? = null,
|
providerData: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = execute(
|
): ContentMessage<InvoiceContent> = execute(
|
||||||
@@ -158,10 +169,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
startParameter = startParameter,
|
startParameter = startParameter,
|
||||||
providerData = providerData,
|
providerData = providerData,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -183,6 +196,7 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = sendInvoice(
|
): ContentMessage<InvoiceContent> = sendInvoice(
|
||||||
@@ -194,10 +208,12 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
startParameter = startParameter,
|
startParameter = startParameter,
|
||||||
providerData = providerData,
|
providerData = providerData,
|
||||||
threadId = null,
|
threadId = null,
|
||||||
|
directMessageThreadId = null,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.PollContent
|
import dev.inmo.tgbotapi.types.message.content.PollContent
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||||
@@ -26,11 +27,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -47,11 +50,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -69,11 +74,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -89,11 +96,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -111,11 +120,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -131,11 +142,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -153,11 +166,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -172,11 +187,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -194,11 +211,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -214,11 +233,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -235,11 +256,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -254,11 +277,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -275,11 +300,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -294,11 +321,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -314,11 +343,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -332,11 +363,13 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.PollContent
|
import dev.inmo.tgbotapi.types.message.content.PollContent
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||||
@@ -24,11 +25,13 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -43,13 +46,15 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyMarkup = replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -63,11 +68,13 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -81,13 +88,15 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyMarkup = replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -101,11 +110,13 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -119,13 +130,15 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyMarkup = replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -138,11 +151,13 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
@@ -155,12 +170,14 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyMarkup = replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.api.suggested
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
|
import dev.inmo.tgbotapi.requests.suggested.ApproveSuggestedPost
|
||||||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.approveSuggestedPost(
|
||||||
|
chatId: IdChatIdentifier,
|
||||||
|
messageId: MessageId,
|
||||||
|
sendDate: TelegramDate? = null,
|
||||||
|
): Boolean = execute(
|
||||||
|
ApproveSuggestedPost(chatId, messageId, sendDate)
|
||||||
|
)
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.approveSuggestedPost(
|
||||||
|
chat: Chat,
|
||||||
|
messageId: MessageId,
|
||||||
|
sendDate: TelegramDate? = null,
|
||||||
|
): Boolean = approveSuggestedPost(chat.id, messageId, sendDate)
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.approveSuggestedPost(
|
||||||
|
message: Message,
|
||||||
|
sendDate: TelegramDate? = null,
|
||||||
|
): Boolean = approveSuggestedPost(message.chat, message.messageId, sendDate)
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.api.suggested
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
|
import dev.inmo.tgbotapi.requests.suggested.ApproveSuggestedPost
|
||||||
|
import dev.inmo.tgbotapi.requests.suggested.DeclineSuggestedPost
|
||||||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.declineSuggestedPost(
|
||||||
|
chatId: IdChatIdentifier,
|
||||||
|
messageId: MessageId,
|
||||||
|
comment: String? = null,
|
||||||
|
): Boolean = execute(
|
||||||
|
DeclineSuggestedPost(chatId, messageId, comment)
|
||||||
|
)
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.declineSuggestedPost(
|
||||||
|
chat: Chat,
|
||||||
|
messageId: MessageId,
|
||||||
|
comment: String? = null,
|
||||||
|
): Boolean = declineSuggestedPost(chat.id, messageId, comment)
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.declineSuggestedPost(
|
||||||
|
message: Message,
|
||||||
|
comment: String? = null,
|
||||||
|
): Boolean = declineSuggestedPost(message.chat, message.messageId, comment)
|
||||||
@@ -692,6 +692,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
|
|||||||
public static synthetic fun waitRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitSuccessfulPaymentEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitSuccessfulPaymentEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitSuccessfulPaymentEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitSuccessfulPaymentEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitSuggestedPostApprovalFailed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitSuggestedPostApprovalFailed$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitSuggestedPostApproved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitSuggestedPostApproved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitSuggestedPostDeclined (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitSuggestedPostDeclined$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitSuggestedPostPaid (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitSuggestedPostPaid$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitSuggestedPostRefunded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitSuggestedPostRefunded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitSupergroupChatCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitSupergroupChatCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitSupergroupChatCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitSupergroupChatCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitSupergroupEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitSupergroupEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
@@ -1408,6 +1418,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
|
|||||||
public static synthetic fun onRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onSuccessfulPayment (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onSuccessfulPayment (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
public static synthetic fun onSuccessfulPayment$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onSuccessfulPayment$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onSuggestedPostApprovalFailed (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onSuggestedPostApprovalFailed$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onSuggestedPostApproved (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onSuggestedPostApproved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onSuggestedPostDeclined (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onSuggestedPostDeclined$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onSuggestedPostPaid (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onSuggestedPostPaid$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onSuggestedPostRefunded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onSuggestedPostRefunded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onSupergroupChatCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onSupergroupChatCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
public static synthetic fun onSupergroupChatCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onSupergroupChatCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onSupergroupEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onSupergroupEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
import dev.inmo.tgbotapi.extensions.utils.*
|
import dev.inmo.tgbotapi.extensions.utils.*
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
import dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged
|
||||||
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||||
@@ -22,6 +22,12 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
|||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
|
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
|
||||||
import dev.inmo.tgbotapi.types.message.payments.RefundedPaymentEvent
|
import dev.inmo.tgbotapi.types.message.payments.RefundedPaymentEvent
|
||||||
@@ -281,4 +287,29 @@ fun BehaviourContext.waitChecklistTasksAdded(
|
|||||||
fun BehaviourContext.waitChannelDirectMessagesConfigurationChanged(
|
fun BehaviourContext.waitChannelDirectMessagesConfigurationChanged(
|
||||||
initRequest: Request<*>? = null,
|
initRequest: Request<*>? = null,
|
||||||
errorFactory: NullableRequestBuilder<*> = { null }
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
) = waitEvents<ChannelDirectMessagesConfigurationChanged>(initRequest, errorFactory)
|
) = waitEvents<DirectMessagesConfigurationChanged>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitSuggestedPostApprovalFailed(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<SuggestedPostApprovalFailed>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitSuggestedPostRefunded(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<SuggestedPostRefunded>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitSuggestedPostDeclined(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<SuggestedPostDeclined>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitSuggestedPostPaid(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<SuggestedPostPaid>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitSuggestedPostApproved(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<SuggestedPostApproved>(initRequest, errorFactory)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.Mar
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
|
||||||
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
|
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
|
||||||
import dev.inmo.tgbotapi.extensions.utils.chatEventMessageOrNull
|
import dev.inmo.tgbotapi.extensions.utils.chatEventMessageOrNull
|
||||||
import dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
import dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged
|
||||||
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||||
@@ -28,8 +28,15 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
|||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
|
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.*
|
||||||
import dev.inmo.tgbotapi.types.message.PrivateEventMessage
|
import dev.inmo.tgbotapi.types.message.PrivateEventMessage
|
||||||
|
import dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage
|
||||||
import dev.inmo.tgbotapi.types.message.payments.RefundedPaymentEvent
|
import dev.inmo.tgbotapi.types.message.payments.RefundedPaymentEvent
|
||||||
@@ -1176,9 +1183,119 @@ fun <BC : BehaviourContext> BC.onChecklistTasksAdded(
|
|||||||
* data
|
* data
|
||||||
*/
|
*/
|
||||||
fun <BC : BehaviourContext> BC.onChannelDirectMessagesConfigurationChanged(
|
fun <BC : BehaviourContext> BC.onChannelDirectMessagesConfigurationChanged(
|
||||||
initialFilter: SimpleFilter<ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>? = null,
|
initialFilter: SimpleFilter<ChannelEventMessage<DirectMessagesConfigurationChanged>>? = null,
|
||||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>, Update>? = MessageFilterByChat,
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelEventMessage<DirectMessagesConfigurationChanged>, Update>? = MessageFilterByChat,
|
||||||
markerFactory: MarkerFactory<in ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>, Any>? = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChannelEventMessage<DirectMessagesConfigurationChanged>, Any>? = ByChatMessageMarkerFactory,
|
||||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>? = null,
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelEventMessage<DirectMessagesConfigurationChanged>>? = null,
|
||||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelEventMessage<DirectMessagesConfigurationChanged>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onSuggestedPostApproved(
|
||||||
|
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostApproved>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostApproved>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostApproved>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostApproved>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostApproved>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onSuggestedPostApprovalFailed(
|
||||||
|
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostApprovalFailed>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostApprovalFailed>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostApprovalFailed>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostApprovalFailed>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostApprovalFailed>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onSuggestedPostDeclined(
|
||||||
|
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostDeclined>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostDeclined>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostDeclined>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostDeclined>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostDeclined>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onSuggestedPostPaid(
|
||||||
|
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostPaid>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostPaid>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostPaid>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostPaid>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostPaid>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onSuggestedPostRefunded(
|
||||||
|
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostRefunded>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostRefunded>>
|
||||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ fun <BC : BehaviourContext, R, U : Update> CustomBehaviourContextAndTypeReceiver
|
|||||||
*/
|
*/
|
||||||
class DefaultCustomBehaviourContextAndTypeReceiver<BC : BehaviourContext, R, U : Update>(
|
class DefaultCustomBehaviourContextAndTypeReceiver<BC : BehaviourContext, R, U : Update>(
|
||||||
private val wrapperReceiver: CustomBehaviourContextAndTypeReceiver<BC, R, U>
|
private val wrapperReceiver: CustomBehaviourContextAndTypeReceiver<BC, R, U>
|
||||||
) : CustomBehaviourContextAndTypeReceiver<BC, R, U> {
|
) : suspend (BC, U) -> R {
|
||||||
private var botInfo: ExtendedBot? = null
|
private var botInfo: ExtendedBot? = null
|
||||||
private val mutex = Mutex()
|
private val mutex = Mutex()
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -47,12 +47,19 @@ kotlin {
|
|||||||
api libs.ktor.server.host.common
|
api libs.ktor.server.host.common
|
||||||
|
|
||||||
api libs.ktor.client.cio
|
api libs.ktor.client.cio
|
||||||
|
api libs.ktor.client.java
|
||||||
|
|
||||||
api libs.javax.activation
|
api libs.javax.activation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linuxX64Main {
|
jsMain {
|
||||||
|
dependencies {
|
||||||
|
api libs.ktor.client.js
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
linuxMain {
|
||||||
dependencies {
|
dependencies {
|
||||||
api libs.ktor.client.curl
|
api libs.ktor.client.curl
|
||||||
}
|
}
|
||||||
@@ -64,7 +71,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mingwX64Main {
|
mingwMain {
|
||||||
dependencies {
|
dependencies {
|
||||||
api libs.ktor.client.winhttp
|
api libs.ktor.client.winhttp
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package dev.inmo.tgbotapi.abstracts.types
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
|
|
||||||
|
interface OptionallyPaidPost {
|
||||||
|
val suggestedPostParameters: SuggestedPostParameters?
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
|
import dev.inmo.tgbotapi.utils.defaultKtorEngine
|
||||||
import dev.inmo.tgbotapi.utils.nonstrictJsonFormat
|
import dev.inmo.tgbotapi.utils.nonstrictJsonFormat
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
@@ -37,7 +38,7 @@ expect class KtorRequestsExecutor internal constructor(
|
|||||||
|
|
||||||
fun KtorRequestsExecutor(
|
fun KtorRequestsExecutor(
|
||||||
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
||||||
client: HttpClient = HttpClient(),
|
client: HttpClient = HttpClient(defaultKtorEngine),
|
||||||
callsFactories: List<KtorCallFactory> = emptyList(),
|
callsFactories: List<KtorCallFactory> = emptyList(),
|
||||||
excludeDefaultFactories: Boolean = false,
|
excludeDefaultFactories: Boolean = false,
|
||||||
requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter,
|
requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ fun createTelegramBotDefaultKtorCallRequestsFactories(logger: KSLog? = null) = l
|
|||||||
class KtorRequestsExecutorBuilder(
|
class KtorRequestsExecutorBuilder(
|
||||||
var telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
|
var telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
|
||||||
) {
|
) {
|
||||||
var client: HttpClient = HttpClient()
|
var client: HttpClient = HttpClient(defaultKtorEngine)
|
||||||
var callsFactories: List<KtorCallFactory> = emptyList()
|
var callsFactories: List<KtorCallFactory> = emptyList()
|
||||||
var excludeDefaultFactories: Boolean = false
|
var excludeDefaultFactories: Boolean = false
|
||||||
var requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter
|
var requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter
|
||||||
|
|||||||
@@ -4,8 +4,11 @@ import dev.inmo.tgbotapi.abstracts.WithCustomStartMediaData
|
|||||||
import dev.inmo.tgbotapi.abstracts.types.MessageAction
|
import dev.inmo.tgbotapi.abstracts.types.MessageAction
|
||||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyDirectMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallySuggestedPostRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
@@ -24,13 +27,25 @@ data class ForwardMessage(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
@SerialName(videoStartTimestampField)
|
@SerialName(videoStartTimestampField)
|
||||||
override val startTimestamp: Seconds? = null,
|
override val startTimestamp: Seconds? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
val disableNotification: Boolean = false,
|
val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false
|
override val protectContent: Boolean = false,
|
||||||
): SimpleRequest<PossiblyForwardedMessage>, MessageAction, ProtectContent, OptionallyMessageThreadRequest, WithCustomStartMediaData {
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null
|
||||||
|
): SimpleRequest<PossiblyForwardedMessage>,
|
||||||
|
MessageAction,
|
||||||
|
ProtectContent,
|
||||||
|
OptionallyMessageThreadRequest,
|
||||||
|
OptionallyDirectMessageThreadRequest,
|
||||||
|
OptionallySuggestedPostRequest,
|
||||||
|
WithCustomStartMediaData {
|
||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
get() = fromChatId
|
get() = fromChatId
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.abstracts.types.DisableNotification
|
|||||||
import dev.inmo.tgbotapi.abstracts.types.MessagesAction
|
import dev.inmo.tgbotapi.abstracts.types.MessagesAction
|
||||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyDirectMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
@@ -14,6 +15,7 @@ fun ForwardMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -22,6 +24,7 @@ fun ForwardMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds.toList(),
|
messageIds = messageIds.toList(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -39,6 +42,10 @@ data class ForwardMessages (
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@@ -49,6 +56,7 @@ data class ForwardMessages (
|
|||||||
MessagesAction,
|
MessagesAction,
|
||||||
ProtectContent,
|
ProtectContent,
|
||||||
OptionallyMessageThreadRequest,
|
OptionallyMessageThreadRequest,
|
||||||
|
OptionallyDirectMessageThreadRequest,
|
||||||
DisableNotification {
|
DisableNotification {
|
||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
get() = fromChatId
|
get() = fromChatId
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ data class PromoteChatMember(
|
|||||||
@SerialName(canEditStoriesField)
|
@SerialName(canEditStoriesField)
|
||||||
private val canEditStories: Boolean? = null,
|
private val canEditStories: Boolean? = null,
|
||||||
@SerialName(canDeleteStoriesField)
|
@SerialName(canDeleteStoriesField)
|
||||||
private val canDeleteStories: Boolean? = null
|
private val canDeleteStories: Boolean? = null,
|
||||||
|
@SerialName(canManageDirectMessagesField)
|
||||||
|
private val canManageDirectMessages: Boolean? = null,
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "promoteChatMember"
|
override fun method(): String = "promoteChatMember"
|
||||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
@@ -104,7 +106,8 @@ fun PromoteChannelAdministrator(
|
|||||||
canManageChat: Boolean? = null,
|
canManageChat: Boolean? = null,
|
||||||
canPostStories: Boolean? = null,
|
canPostStories: Boolean? = null,
|
||||||
canEditStories: Boolean? = null,
|
canEditStories: Boolean? = null,
|
||||||
canDeleteStories: Boolean? = null
|
canDeleteStories: Boolean? = null,
|
||||||
|
canManageDirectMessages: Boolean? = null,
|
||||||
) = PromoteChatMember(
|
) = PromoteChatMember(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
userId = userId,
|
userId = userId,
|
||||||
@@ -123,7 +126,8 @@ fun PromoteChannelAdministrator(
|
|||||||
canManageTopics = null,
|
canManageTopics = null,
|
||||||
canPostStories = canPostStories,
|
canPostStories = canPostStories,
|
||||||
canEditStories = canEditStories,
|
canEditStories = canEditStories,
|
||||||
canDeleteStories = canDeleteStories
|
canDeleteStories = canDeleteStories,
|
||||||
|
canManageDirectMessages = canManageDirectMessages
|
||||||
)
|
)
|
||||||
|
|
||||||
fun PromoteSupergroupAdministrator(
|
fun PromoteSupergroupAdministrator(
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ fun CopyMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = CopyMessage(
|
) = CopyMessage(
|
||||||
@@ -105,10 +107,12 @@ fun CopyMessage(
|
|||||||
rawEntities = null,
|
rawEntities = null,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -120,10 +124,12 @@ fun CopyMessage(
|
|||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
startTimestamp: Seconds? = null,
|
startTimestamp: Seconds? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = CopyMessage(
|
) = CopyMessage(
|
||||||
@@ -135,10 +141,12 @@ fun CopyMessage(
|
|||||||
rawEntities = entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
startTimestamp = startTimestamp,
|
startTimestamp = startTimestamp,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -164,6 +172,10 @@ data class CopyMessage internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
@SerialName(videoStartTimestampField)
|
@SerialName(videoStartTimestampField)
|
||||||
override val startTimestamp: Seconds? = null,
|
override val startTimestamp: Seconds? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -172,6 +184,8 @@ data class CopyMessage internal constructor(
|
|||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(allowPaidBroadcastField)
|
@SerialName(allowPaidBroadcastField)
|
||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.requests.send
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.*
|
import dev.inmo.tgbotapi.abstracts.types.*
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyDirectMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
@@ -19,6 +20,7 @@ fun CopyMessages(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageIds: Array<MessageId>,
|
messageIds: Array<MessageId>,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
removeCaption: Boolean = false
|
removeCaption: Boolean = false
|
||||||
@@ -27,6 +29,7 @@ fun CopyMessages(
|
|||||||
fromChatId = fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageIds = messageIds.toList(),
|
messageIds = messageIds.toList(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
removeCaption = removeCaption
|
removeCaption = removeCaption
|
||||||
@@ -44,6 +47,10 @@ data class CopyMessages (
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = toChatId.directMessageThreadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@@ -54,6 +61,7 @@ data class CopyMessages (
|
|||||||
MessagesAction,
|
MessagesAction,
|
||||||
ProtectContent,
|
ProtectContent,
|
||||||
OptionallyMessageThreadRequest,
|
OptionallyMessageThreadRequest,
|
||||||
|
OptionallyDirectMessageThreadRequest,
|
||||||
DisableNotification {
|
DisableNotification {
|
||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
get() = fromChatId
|
get() = fromChatId
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||||
@@ -28,6 +29,10 @@ data class SendContact(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -38,6 +43,8 @@ data class SendContact(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -49,11 +56,13 @@ data class SendContact(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): this(
|
): this(
|
||||||
@@ -62,11 +71,13 @@ data class SendContact(
|
|||||||
contact.firstName,
|
contact.firstName,
|
||||||
contact.lastName,
|
contact.lastName,
|
||||||
threadId,
|
threadId,
|
||||||
|
directMessageThreadId,
|
||||||
businessConnectionId,
|
businessConnectionId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
protectContent,
|
protectContent,
|
||||||
allowPaidBroadcast,
|
allowPaidBroadcast,
|
||||||
effectId,
|
effectId,
|
||||||
|
suggestedPostParameters,
|
||||||
replyParameters,
|
replyParameters,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@@ -81,22 +92,26 @@ data class SendContact(
|
|||||||
fun Contact.toRequest(
|
fun Contact.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): SendContact = SendContact(
|
): SendContact = SendContact(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
contact = this,
|
contact = this,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
||||||
@@ -27,6 +28,10 @@ data class SendDice(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -37,6 +42,8 @@ data class SendDice(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.*
|
|||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.*
|
import dev.inmo.tgbotapi.types.message.content.*
|
||||||
@@ -30,11 +31,13 @@ fun SendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendLocation.Static(
|
) = SendLocation.Static(
|
||||||
@@ -42,11 +45,13 @@ fun SendLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -56,11 +61,13 @@ fun SendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendLocation.Static(
|
) = SendLocation.Static(
|
||||||
@@ -68,11 +75,13 @@ fun SendStaticLocation(
|
|||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -86,11 +95,13 @@ fun SendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendLocation.Live(
|
) = SendLocation.Live(
|
||||||
@@ -102,11 +113,13 @@ fun SendLiveLocation(
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -143,6 +156,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
@@ -155,6 +172,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -187,6 +206,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
@OptIn(ExperimentalSerializationApi::class)
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
@@ -199,6 +222,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -237,6 +262,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
val proximityAlertRadius: Meters? = null,
|
val proximityAlertRadius: Meters? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
val threadId: MessageThreadId? = chatId.threadId,
|
val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -247,6 +274,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
val allowPaidBroadcast: Boolean = false,
|
val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
val effectId: EffectId? = null,
|
val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
val replyParameters: ReplyParameters? = null,
|
val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -265,11 +294,13 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
latitude = surrogate.latitude,
|
latitude = surrogate.latitude,
|
||||||
longitude = surrogate.longitude,
|
longitude = surrogate.longitude,
|
||||||
threadId = surrogate.threadId,
|
threadId = surrogate.threadId,
|
||||||
|
directMessageThreadId = surrogate.directMessageThreadId,
|
||||||
businessConnectionId = surrogate.businessConnectionId,
|
businessConnectionId = surrogate.businessConnectionId,
|
||||||
disableNotification = surrogate.disableNotification,
|
disableNotification = surrogate.disableNotification,
|
||||||
protectContent = surrogate.protectContent,
|
protectContent = surrogate.protectContent,
|
||||||
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||||
effectId = surrogate.effectId,
|
effectId = surrogate.effectId,
|
||||||
|
suggestedPostParameters = surrogate.suggestedPostParameters,
|
||||||
replyParameters = surrogate.replyParameters,
|
replyParameters = surrogate.replyParameters,
|
||||||
replyMarkup = surrogate.replyMarkup
|
replyMarkup = surrogate.replyMarkup
|
||||||
)
|
)
|
||||||
@@ -282,11 +313,13 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
heading = surrogate.heading,
|
heading = surrogate.heading,
|
||||||
proximityAlertRadius = surrogate.proximityAlertRadius,
|
proximityAlertRadius = surrogate.proximityAlertRadius,
|
||||||
threadId = surrogate.threadId,
|
threadId = surrogate.threadId,
|
||||||
|
directMessageThreadId = surrogate.directMessageThreadId,
|
||||||
businessConnectionId = surrogate.businessConnectionId,
|
businessConnectionId = surrogate.businessConnectionId,
|
||||||
disableNotification = surrogate.disableNotification,
|
disableNotification = surrogate.disableNotification,
|
||||||
protectContent = surrogate.protectContent,
|
protectContent = surrogate.protectContent,
|
||||||
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||||
effectId = surrogate.effectId,
|
effectId = surrogate.effectId,
|
||||||
|
suggestedPostParameters = surrogate.suggestedPostParameters,
|
||||||
replyParameters = surrogate.replyParameters,
|
replyParameters = surrogate.replyParameters,
|
||||||
replyMarkup = surrogate.replyMarkup
|
replyMarkup = surrogate.replyMarkup
|
||||||
)
|
)
|
||||||
@@ -304,11 +337,13 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
heading = heading,
|
heading = heading,
|
||||||
proximityAlertRadius = proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,11 +27,13 @@ fun SendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendTextMessage(
|
) = SendTextMessage(
|
||||||
@@ -40,12 +42,14 @@ fun SendTextMessage(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
rawEntities = null,
|
rawEntities = null,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -55,11 +59,13 @@ fun SendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
linkPreviewOptions: LinkPreviewOptions? = null,
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendTextMessage(
|
) = SendTextMessage(
|
||||||
@@ -68,12 +74,14 @@ fun SendTextMessage(
|
|||||||
parseMode = null,
|
parseMode = null,
|
||||||
rawEntities = entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
linkPreviewOptions = linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -93,6 +101,10 @@ data class SendTextMessage internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(linkPreviewOptionsField)
|
@SerialName(linkPreviewOptionsField)
|
||||||
@@ -105,6 +117,8 @@ data class SendTextMessage internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.*
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.VenueContent
|
import dev.inmo.tgbotapi.types.message.content.VenueContent
|
||||||
@@ -37,6 +38,10 @@ data class SendVenue(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -47,6 +52,8 @@ data class SendVenue(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -60,11 +67,13 @@ data class SendVenue(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): this(
|
): this(
|
||||||
@@ -78,11 +87,13 @@ data class SendVenue(
|
|||||||
googlePlaceId = venue.googlePlaceId,
|
googlePlaceId = venue.googlePlaceId,
|
||||||
googlePlaceType = venue.googlePlaceType,
|
googlePlaceType = venue.googlePlaceType,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -97,22 +108,26 @@ data class SendVenue(
|
|||||||
fun Venue.toRequest(
|
fun Venue.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): SendVenue = SendVenue(
|
): SendVenue = SendVenue(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
venue = this,
|
venue = this,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.DirectMessageThreadId
|
||||||
|
|
||||||
|
interface OptionallyDirectMessageThreadRequest {
|
||||||
|
val directMessageThreadId: DirectMessageThreadId?
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
|
|
||||||
|
interface OptionallySuggestedPostRequest {
|
||||||
|
val suggestedPostParameters: SuggestedPostParameters?
|
||||||
|
}
|
||||||
@@ -7,4 +7,6 @@ interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>,
|
|||||||
DisableNotification,
|
DisableNotification,
|
||||||
ProtectContent,
|
ProtectContent,
|
||||||
AllowPaidBroadcast,
|
AllowPaidBroadcast,
|
||||||
OptionallyMessageThreadRequest
|
OptionallyMessageThreadRequest,
|
||||||
|
OptionallyDirectMessageThreadRequest,
|
||||||
|
OptionallySuggestedPostRequest
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||||
@@ -24,6 +25,10 @@ data class SendGame (
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -34,6 +39,8 @@ data class SendGame (
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -35,11 +35,13 @@ fun SendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<AnimationContent>> {
|
): Request<ContentMessage<AnimationContent>> {
|
||||||
@@ -59,11 +61,13 @@ fun SendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -89,11 +93,13 @@ fun SendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<AnimationContent>> {
|
): Request<ContentMessage<AnimationContent>> {
|
||||||
@@ -113,11 +119,13 @@ fun SendAnimation(
|
|||||||
width = width,
|
width = width,
|
||||||
height = height,
|
height = height,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -164,6 +172,10 @@ data class SendAnimationData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -174,6 +186,8 @@ data class SendAnimationData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -34,11 +34,13 @@ fun SendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<AudioContent>> {
|
): Request<ContentMessage<AudioContent>> {
|
||||||
@@ -56,11 +58,13 @@ fun SendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -84,11 +88,13 @@ fun SendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<AudioContent>> {
|
): Request<ContentMessage<AudioContent>> {
|
||||||
@@ -106,11 +112,13 @@ fun SendAudio(
|
|||||||
performer = performer,
|
performer = performer,
|
||||||
title = title,
|
title = title,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -153,6 +161,10 @@ data class SendAudioData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -163,6 +175,8 @@ data class SendAudioData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -39,11 +39,13 @@ fun SendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -59,11 +61,13 @@ fun SendDocument(
|
|||||||
parseMode = parseMode,
|
parseMode = parseMode,
|
||||||
rawEntities = null,
|
rawEntities = null,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -94,11 +98,13 @@ fun SendDocument(
|
|||||||
thumbnail: InputFile? = null,
|
thumbnail: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
@@ -114,11 +120,13 @@ fun SendDocument(
|
|||||||
parseMode = null,
|
parseMode = null,
|
||||||
rawEntities = entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
disableContentTypeDetection = disableContentTypeDetection
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
@@ -165,6 +173,10 @@ data class SendDocumentData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -175,6 +187,8 @@ data class SendDocumentData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.requests.send.media.base.*
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.media.*
|
import dev.inmo.tgbotapi.types.media.*
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
|
||||||
@@ -35,11 +36,13 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): Request<ContentMessage<MediaGroupContent<T>>> {
|
): Request<ContentMessage<MediaGroupContent<T>>> {
|
||||||
if (media.size !in mediaCountInMediaGroup) {
|
if (media.size !in mediaCountInMediaGroup) {
|
||||||
@@ -66,11 +69,13 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -95,21 +100,25 @@ inline fun SendPlaylist(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
) = SendMediaGroup<AudioContent>(
|
) = SendMediaGroup<AudioContent>(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -123,21 +132,25 @@ inline fun SendDocumentsGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
) = SendMediaGroup<DocumentContent>(
|
) = SendMediaGroup<DocumentContent>(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -152,21 +165,25 @@ inline fun SendVisualMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
) = SendMediaGroup<VisualMediaGroupPartContent>(
|
) = SendMediaGroup<VisualMediaGroupPartContent>(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
media = media,
|
media = media,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -195,6 +212,10 @@ data class SendMediaGroupData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -205,6 +226,8 @@ data class SendMediaGroupData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
) : DataRequest<PossiblySentViaBotCommonMessage<MediaGroupContent<MediaGroupPartContent>>>,
|
) : DataRequest<PossiblySentViaBotCommonMessage<MediaGroupContent<MediaGroupPartContent>>>,
|
||||||
|
|||||||
@@ -34,10 +34,12 @@ fun SendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PaidMediaInfoContent>> {
|
): Request<ContentMessage<PaidMediaInfoContent>> {
|
||||||
@@ -51,10 +53,12 @@ fun SendPaidMedia(
|
|||||||
rawEntities = null,
|
rawEntities = null,
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -93,10 +97,12 @@ fun SendPaidMedia(
|
|||||||
payload: PaidMediaPayload? = null,
|
payload: PaidMediaPayload? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PaidMediaInfoContent>> {
|
): Request<ContentMessage<PaidMediaInfoContent>> {
|
||||||
@@ -110,10 +116,12 @@ fun SendPaidMedia(
|
|||||||
rawEntities = entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -171,6 +179,10 @@ data class SendPaidMediaData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -179,6 +191,8 @@ data class SendPaidMediaData internal constructor(
|
|||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(allowPaidBroadcastField)
|
@SerialName(allowPaidBroadcastField)
|
||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ fun SendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PhotoContent>> {
|
): Request<ContentMessage<PhotoContent>> {
|
||||||
@@ -47,11 +49,13 @@ fun SendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -72,11 +76,13 @@ fun SendPhoto(
|
|||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
spoilered: Boolean = false,
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PhotoContent>> {
|
): Request<ContentMessage<PhotoContent>> {
|
||||||
@@ -89,11 +95,13 @@ fun SendPhoto(
|
|||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
spoilered = spoilered,
|
spoilered = spoilered,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -132,6 +140,10 @@ data class SendPhotoData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -142,6 +154,8 @@ data class SendPhotoData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
||||||
@@ -18,24 +19,28 @@ fun SendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<StickerContent>> = SendStickerByFileId(
|
): Request<ContentMessage<StickerContent>> = SendStickerByFileId(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
sticker = sticker,
|
sticker = sticker,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
).let {
|
).let {
|
||||||
@@ -62,6 +67,10 @@ data class SendStickerByFileId internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(emojiField)
|
@SerialName(emojiField)
|
||||||
@@ -74,6 +83,8 @@ data class SendStickerByFileId internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -39,11 +39,13 @@ fun SendVideo(
|
|||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<VideoContent>> {
|
): Request<ContentMessage<VideoContent>> {
|
||||||
@@ -67,11 +69,13 @@ fun SendVideo(
|
|||||||
height = height,
|
height = height,
|
||||||
supportStreaming = supportStreaming,
|
supportStreaming = supportStreaming,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -100,11 +104,13 @@ fun SendVideo(
|
|||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<VideoContent>> {
|
): Request<ContentMessage<VideoContent>> {
|
||||||
@@ -128,11 +134,13 @@ fun SendVideo(
|
|||||||
height = height,
|
height = height,
|
||||||
supportStreaming = supportStreaming,
|
supportStreaming = supportStreaming,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -185,6 +193,10 @@ data class SendVideoData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -195,6 +207,8 @@ data class SendVideoData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.requests.send.media.base.*
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
|
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
|
||||||
@@ -21,11 +22,13 @@ fun SendVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null, // in documentation - length (size of video side)
|
size: Int? = null, // in documentation - length (size of video side)
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<VideoNoteContent>> {
|
): Request<ContentMessage<VideoNoteContent>> {
|
||||||
@@ -39,11 +42,13 @@ fun SendVideoNote(
|
|||||||
duration = duration,
|
duration = duration,
|
||||||
width = size,
|
width = size,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -78,6 +83,10 @@ data class SendVideoNoteData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -88,6 +97,8 @@ data class SendVideoNoteData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -28,11 +28,13 @@ fun SendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<VoiceContent>> {
|
): Request<ContentMessage<VoiceContent>> {
|
||||||
@@ -46,11 +48,13 @@ fun SendVoice(
|
|||||||
rawEntities = null,
|
rawEntities = null,
|
||||||
duration = duration,
|
duration = duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -70,12 +74,14 @@ fun SendVoice(
|
|||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<VoiceContent>> {
|
): Request<ContentMessage<VoiceContent>> {
|
||||||
@@ -89,11 +95,13 @@ fun SendVoice(
|
|||||||
rawEntities = entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -130,6 +138,10 @@ data class SendVoiceData internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -140,6 +152,8 @@ data class SendVoiceData internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyWithEffectRequest
|
|||||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
||||||
@@ -66,6 +67,10 @@ data class SendInvoice(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@@ -74,6 +79,8 @@ data class SendInvoice(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -114,10 +121,12 @@ data class SendInvoice(
|
|||||||
startParameter: StartParameter? = null,
|
startParameter: StartParameter? = null,
|
||||||
providerData: String? = null,
|
providerData: String? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -131,10 +140,12 @@ data class SendInvoice(
|
|||||||
startParameter = startParameter,
|
startParameter = startParameter,
|
||||||
providerData = providerData,
|
providerData = providerData,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||||
@@ -49,24 +50,30 @@ fun SendPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
chatId,
|
chatId,
|
||||||
question,
|
question,
|
||||||
options,
|
options,
|
||||||
|
null,
|
||||||
questionParseMode,
|
questionParseMode,
|
||||||
isAnonymous,
|
isAnonymous,
|
||||||
isClosed,
|
isClosed,
|
||||||
|
false,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -78,23 +85,30 @@ fun SendPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
questionEntities = textSources,
|
questionTextSources = textSources,
|
||||||
options = options,
|
options = options,
|
||||||
|
closeInfo = null,
|
||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
|
allowMultipleAnswers = false,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
disableNotification = disableNotification,
|
effectId = null,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -106,11 +120,13 @@ fun SendPoll(
|
|||||||
fun Poll.createRequest(
|
fun Poll.createRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = when (this) {
|
) = when (this) {
|
||||||
@@ -123,11 +139,13 @@ fun Poll.createRequest(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -142,11 +160,13 @@ fun Poll.createRequest(
|
|||||||
isAnonymous = isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -159,11 +179,13 @@ fun Poll.createRequest(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = false,
|
allowMultipleAnswers = false,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -176,11 +198,13 @@ fun Poll.createRequest(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = false,
|
allowMultipleAnswers = false,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.asTextSources
|
import dev.inmo.tgbotapi.types.message.asTextSources
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||||
@@ -52,6 +53,10 @@ class SendQuizPoll internal constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -62,6 +67,8 @@ class SendQuizPoll internal constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -89,11 +96,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -111,11 +120,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -132,11 +143,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -154,11 +167,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -175,11 +190,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -197,11 +214,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -217,11 +236,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod: LongSeconds? = null,
|
openPeriod: LongSeconds? = null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -239,11 +260,13 @@ class SendQuizPoll internal constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -275,11 +298,13 @@ fun SendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendQuizPoll(
|
) = SendQuizPoll(
|
||||||
@@ -295,11 +320,13 @@ fun SendQuizPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -315,11 +342,13 @@ fun SendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendQuizPoll(
|
) = SendQuizPoll(
|
||||||
@@ -334,11 +363,13 @@ fun SendQuizPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -354,11 +385,13 @@ fun SendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendQuizPoll(
|
) = SendQuizPoll(
|
||||||
@@ -373,11 +406,13 @@ fun SendQuizPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -392,11 +427,13 @@ fun SendQuizPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendQuizPoll(
|
) = SendQuizPoll(
|
||||||
@@ -410,11 +447,13 @@ fun SendQuizPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo)?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo)?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||||
|
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
|
||||||
import dev.inmo.tgbotapi.types.message.asTextSources
|
import dev.inmo.tgbotapi.types.message.asTextSources
|
||||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||||
@@ -22,7 +23,7 @@ import kotlinx.serialization.Serializable
|
|||||||
import kotlinx.serialization.SerializationStrategy
|
import kotlinx.serialization.SerializationStrategy
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
class SendRegularPoll private constructor(
|
class SendRegularPoll constructor(
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(questionField)
|
@SerialName(questionField)
|
||||||
@@ -47,6 +48,10 @@ class SendRegularPoll private constructor(
|
|||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
@EncodeDefault
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@EncodeDefault
|
||||||
|
@SerialName(directMessagesTopicIdField)
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@@ -57,6 +62,8 @@ class SendRegularPoll private constructor(
|
|||||||
override val allowPaidBroadcast: Boolean = false,
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
|
@SerialName(suggestedPostParametersField)
|
||||||
|
override val suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@@ -75,11 +82,13 @@ class SendRegularPoll private constructor(
|
|||||||
openPeriod: LongSeconds?= null,
|
openPeriod: LongSeconds?= null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -94,11 +103,13 @@ class SendRegularPoll private constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -114,11 +125,13 @@ class SendRegularPoll private constructor(
|
|||||||
openPeriod: LongSeconds?= null,
|
openPeriod: LongSeconds?= null,
|
||||||
closeDate: LongSeconds? = null,
|
closeDate: LongSeconds? = null,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) : this(
|
) : this(
|
||||||
@@ -133,11 +146,13 @@ class SendRegularPoll private constructor(
|
|||||||
openPeriod = openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate = closeDate,
|
closeDate = closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -162,11 +177,13 @@ fun SendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
@@ -180,11 +197,13 @@ fun SendRegularPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -198,11 +217,13 @@ fun SendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
@@ -215,11 +236,13 @@ fun SendRegularPoll(
|
|||||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||||
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -232,11 +255,13 @@ fun SendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowPaidBroadcast: Boolean = false,
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
|
suggestedPostParameters: SuggestedPostParameters? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builder: EntitiesBuilderBody
|
builder: EntitiesBuilderBody
|
||||||
@@ -249,11 +274,13 @@ fun SendRegularPoll(
|
|||||||
isClosed = isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers = allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
|
directMessageThreadId = directMessageThreadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
allowPaidBroadcast = allowPaidBroadcast,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
|
suggestedPostParameters = suggestedPostParameters,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package dev.inmo.tgbotapi.requests.suggested
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.types.ChatIdentifierSerializer
|
||||||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
|
import dev.inmo.tgbotapi.types.chatIdField
|
||||||
|
import dev.inmo.tgbotapi.types.messageIdField
|
||||||
|
import dev.inmo.tgbotapi.types.sendDateField
|
||||||
|
import kotlinx.serialization.DeserializationStrategy
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.SerializationStrategy
|
||||||
|
import kotlinx.serialization.builtins.serializer
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ApproveSuggestedPost(
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(chatIdField)
|
||||||
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
|
override val chatId: IdChatIdentifier,
|
||||||
|
@SerialName(messageIdField)
|
||||||
|
val messageId: MessageId,
|
||||||
|
@SerialName(sendDateField)
|
||||||
|
val sendDate: TelegramDate? = null,
|
||||||
|
) : SimpleRequest<Boolean>, ChatRequest {
|
||||||
|
override val requestSerializer: SerializationStrategy<ApproveSuggestedPost>
|
||||||
|
get() = serializer()
|
||||||
|
|
||||||
|
override fun method(): String = "approveSuggestedPost"
|
||||||
|
|
||||||
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
get() = Boolean.serializer()
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package dev.inmo.tgbotapi.requests.suggested
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.types.ChatIdentifierSerializer
|
||||||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
import dev.inmo.tgbotapi.types.MessageId
|
||||||
|
import dev.inmo.tgbotapi.types.chatIdField
|
||||||
|
import dev.inmo.tgbotapi.types.commentField
|
||||||
|
import dev.inmo.tgbotapi.types.messageIdField
|
||||||
|
import kotlinx.serialization.DeserializationStrategy
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.SerializationStrategy
|
||||||
|
import kotlinx.serialization.builtins.serializer
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class DeclineSuggestedPost(
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(chatIdField)
|
||||||
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
|
override val chatId: IdChatIdentifier,
|
||||||
|
@SerialName(messageIdField)
|
||||||
|
val messageId: MessageId,
|
||||||
|
@SerialName(commentField)
|
||||||
|
val comment: String? = null,
|
||||||
|
) : SimpleRequest<Boolean>, ChatRequest {
|
||||||
|
override val requestSerializer: SerializationStrategy<DeclineSuggestedPost>
|
||||||
|
get() = serializer()
|
||||||
|
|
||||||
|
override fun method(): String = "declineSuggestedPost"
|
||||||
|
|
||||||
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
get() = Boolean.serializer()
|
||||||
|
}
|
||||||
@@ -36,6 +36,8 @@ sealed interface IdChatIdentifier : ChatIdentifier {
|
|||||||
get() = null
|
get() = null
|
||||||
val businessConnectionId: BusinessConnectionId?
|
val businessConnectionId: BusinessConnectionId?
|
||||||
get() = null
|
get() = null
|
||||||
|
val directMessageThreadId: DirectMessageThreadId?
|
||||||
|
get() = null
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId? = null, businessConnectionId: BusinessConnectionId? = null) = threadId ?.let {
|
operator fun invoke(chatId: RawChatId, threadId: MessageThreadId? = null, businessConnectionId: BusinessConnectionId? = null) = threadId ?.let {
|
||||||
@@ -64,6 +66,18 @@ value class ChatIdWithThreadId(val chatIdWithThreadId: Pair<RawChatId, MessageTh
|
|||||||
|
|
||||||
constructor(chatId: RawChatId, threadId: MessageThreadId): this(chatId to threadId)
|
constructor(chatId: RawChatId, threadId: MessageThreadId): this(chatId to threadId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
|
@JvmInline
|
||||||
|
value class ChatIdWithChannelDirectMessageThreadId(val chatIdWithThreadId: Pair<RawChatId, DirectMessageThreadId>) : IdChatIdentifier {
|
||||||
|
override val chatId: RawChatId
|
||||||
|
get() = chatIdWithThreadId.first
|
||||||
|
override val directMessageThreadId: DirectMessageThreadId
|
||||||
|
get() = chatIdWithThreadId.second
|
||||||
|
|
||||||
|
constructor(chatId: RawChatId, threadId: DirectMessageThreadId): this(chatId to threadId)
|
||||||
|
}
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
@JvmInline
|
@JvmInline
|
||||||
@@ -79,16 +93,21 @@ value class BusinessChatId(val chatIdWithBusinessConnectionId: Pair<RawChatId, B
|
|||||||
val ChatIdentifier.threadId: MessageThreadId?
|
val ChatIdentifier.threadId: MessageThreadId?
|
||||||
get() = (this as? IdChatIdentifier) ?.threadId
|
get() = (this as? IdChatIdentifier) ?.threadId
|
||||||
|
|
||||||
|
val ChatIdentifier.directMessageThreadId: DirectMessageThreadId?
|
||||||
|
get() = (this as? IdChatIdentifier) ?.directMessageThreadId
|
||||||
|
|
||||||
val ChatIdentifier.businessConnectionId: BusinessConnectionId?
|
val ChatIdentifier.businessConnectionId: BusinessConnectionId?
|
||||||
get() = (this as? IdChatIdentifier) ?.businessConnectionId
|
get() = (this as? IdChatIdentifier) ?.businessConnectionId
|
||||||
|
|
||||||
fun IdChatIdentifier.toChatId() = when (this) {
|
fun IdChatIdentifier.toChatId() = when (this) {
|
||||||
is ChatId -> this
|
is ChatId -> this
|
||||||
is ChatIdWithThreadId -> ChatId(chatId)
|
is ChatIdWithThreadId -> ChatId(chatId)
|
||||||
|
is ChatIdWithChannelDirectMessageThreadId -> ChatId(chatId)
|
||||||
is BusinessChatId -> ChatId(chatId)
|
is BusinessChatId -> ChatId(chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IdChatIdentifier.toChatWithThreadId(threadId: MessageThreadId) = IdChatIdentifier(chatId, threadId)
|
fun IdChatIdentifier.toChatWithThreadId(threadId: MessageThreadId) = IdChatIdentifier(chatId, threadId)
|
||||||
|
fun IdChatIdentifier.toChatIdWithChannelDirectMessageThreadId(threadId: DirectMessageThreadId) = ChatIdWithChannelDirectMessageThreadId(chatId, threadId)
|
||||||
fun IdChatIdentifier.toBusinessChatId(businessConnectionId: BusinessConnectionId) = IdChatIdentifier(chatId, businessConnectionId)
|
fun IdChatIdentifier.toBusinessChatId(businessConnectionId: BusinessConnectionId) = IdChatIdentifier(chatId, businessConnectionId)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -221,11 +240,20 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
3 -> {
|
3 -> {
|
||||||
val (chatId, _, businessConnectionId) = splitted
|
val (chatId, intermediateDelimiter, additionalId) = splitted
|
||||||
BusinessChatId(
|
val additionalIdAsLong by lazy {
|
||||||
chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
|
additionalId.toLongOrNull()
|
||||||
businessConnectionId.let(::BusinessConnectionId)
|
}
|
||||||
)
|
when {
|
||||||
|
intermediateDelimiter == "cdm" && additionalIdAsLong != null -> ChatIdWithChannelDirectMessageThreadId(
|
||||||
|
chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
|
||||||
|
additionalIdAsLong ?.let(::DirectMessageThreadId) ?: return@let null
|
||||||
|
)
|
||||||
|
else -> BusinessChatId(
|
||||||
|
chatId.toLongOrNull() ?.let(::RawChatId) ?: return@let null,
|
||||||
|
additionalId.let(::BusinessConnectionId)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
@@ -239,6 +267,7 @@ object FullChatIdentifierSerializer : KSerializer<ChatIdentifier> {
|
|||||||
is ChatId -> encoder.encodeLong(value.chatId.long)
|
is ChatId -> encoder.encodeLong(value.chatId.long)
|
||||||
is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}")
|
is ChatIdWithThreadId -> encoder.encodeString("${value.chatId}/${value.threadId}")
|
||||||
is BusinessChatId -> encoder.encodeString("${value.chatId}//${value.businessConnectionId}")
|
is BusinessChatId -> encoder.encodeString("${value.chatId}//${value.businessConnectionId}")
|
||||||
|
is ChatIdWithChannelDirectMessageThreadId -> encoder.encodeString("${value.chatId}/cdm/${value.directMessageThreadId}")
|
||||||
is Username -> encoder.encodeString(value.full)
|
is Username -> encoder.encodeString(value.full)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ const val giveawayMessageIdField = "giveaway_message_id"
|
|||||||
const val messageIdsField = "message_ids"
|
const val messageIdsField = "message_ids"
|
||||||
const val actorChatField = "actor_chat"
|
const val actorChatField = "actor_chat"
|
||||||
const val messageThreadIdField = "message_thread_id"
|
const val messageThreadIdField = "message_thread_id"
|
||||||
|
const val directMessagesTopicIdField = "direct_messages_topic_id"
|
||||||
const val mediaGroupIdField = "media_group_id"
|
const val mediaGroupIdField = "media_group_id"
|
||||||
const val updateIdField = "update_id"
|
const val updateIdField = "update_id"
|
||||||
const val fromChatIdField = "from_chat_id"
|
const val fromChatIdField = "from_chat_id"
|
||||||
@@ -148,6 +149,7 @@ const val disableWebPagePreviewField = "disable_web_page_preview"
|
|||||||
const val linkPreviewOptionsField = "link_preview_options"
|
const val linkPreviewOptionsField = "link_preview_options"
|
||||||
const val disableNotificationField = "disable_notification"
|
const val disableNotificationField = "disable_notification"
|
||||||
const val protectContentField = "protect_content"
|
const val protectContentField = "protect_content"
|
||||||
|
const val suggestedPostParametersField = "suggested_post_parameters"
|
||||||
const val allowPaidBroadcastField = "allow_paid_broadcast"
|
const val allowPaidBroadcastField = "allow_paid_broadcast"
|
||||||
const val messageEffectIdField = "message_effect_id"
|
const val messageEffectIdField = "message_effect_id"
|
||||||
const val removeCaptionField = "remove_caption"
|
const val removeCaptionField = "remove_caption"
|
||||||
@@ -158,6 +160,7 @@ const val quoteField = "quote"
|
|||||||
const val quoteParseModeField = "quote_parse_mode"
|
const val quoteParseModeField = "quote_parse_mode"
|
||||||
const val quoteEntitiesField = "quote_entities"
|
const val quoteEntitiesField = "quote_entities"
|
||||||
const val quotePositionField = "quote_position"
|
const val quotePositionField = "quote_position"
|
||||||
|
const val checklistTaskIdField = "checklist_task_id"
|
||||||
const val replyMarkupField = "reply_markup"
|
const val replyMarkupField = "reply_markup"
|
||||||
const val disableContentTypeDetectionField = "disable_content_type_detection"
|
const val disableContentTypeDetectionField = "disable_content_type_detection"
|
||||||
const val supportStreamingField = "support_streaming"
|
const val supportStreamingField = "support_streaming"
|
||||||
@@ -267,6 +270,7 @@ const val canManageTopicsField = "can_manage_topics"
|
|||||||
const val canPostStoriesField = "can_post_stories"
|
const val canPostStoriesField = "can_post_stories"
|
||||||
const val canEditStoriesField = "can_edit_stories"
|
const val canEditStoriesField = "can_edit_stories"
|
||||||
const val canDeleteStoriesField = "can_delete_stories"
|
const val canDeleteStoriesField = "can_delete_stories"
|
||||||
|
const val canManageDirectMessagesField = "can_manage_direct_messages"
|
||||||
const val captionEntitiesField = "caption_entities"
|
const val captionEntitiesField = "caption_entities"
|
||||||
const val hasSpoilerField = "has_spoiler"
|
const val hasSpoilerField = "has_spoiler"
|
||||||
const val showCaptionAboveMediaField = "show_caption_above_media"
|
const val showCaptionAboveMediaField = "show_caption_above_media"
|
||||||
@@ -290,6 +294,7 @@ const val canSendPaidMediaField = "can_send_paid_media"
|
|||||||
const val activeUsernamesField = "active_usernames"
|
const val activeUsernamesField = "active_usernames"
|
||||||
const val customTitleField = "custom_title"
|
const val customTitleField = "custom_title"
|
||||||
const val optionIdsField = "option_ids"
|
const val optionIdsField = "option_ids"
|
||||||
|
const val parentChatField = "parent_chat"
|
||||||
const val voterChatField = "voter_chat"
|
const val voterChatField = "voter_chat"
|
||||||
const val ipAddressField = "ip_address"
|
const val ipAddressField = "ip_address"
|
||||||
const val linkedChatIdField = "linked_chat_id"
|
const val linkedChatIdField = "linked_chat_id"
|
||||||
@@ -522,6 +527,7 @@ const val creatorField = "creator"
|
|||||||
const val subscriptionPeriodField = "subscription_period"
|
const val subscriptionPeriodField = "subscription_period"
|
||||||
const val subscriptionPriceField = "subscription_price"
|
const val subscriptionPriceField = "subscription_price"
|
||||||
const val copyTextField = "copy_text"
|
const val copyTextField = "copy_text"
|
||||||
|
const val topicIdField = "topic_id"
|
||||||
|
|
||||||
const val isPublicField = "is_public"
|
const val isPublicField = "is_public"
|
||||||
|
|
||||||
@@ -534,6 +540,7 @@ const val convertStarCountField = "convert_star_count"
|
|||||||
const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count"
|
const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count"
|
||||||
const val canBeUpgradedField = "can_be_upgraded"
|
const val canBeUpgradedField = "can_be_upgraded"
|
||||||
const val isPrivateField = "is_private"
|
const val isPrivateField = "is_private"
|
||||||
|
const val isDirectMessagesField = "is_direct_messages"
|
||||||
const val nextTransferDateField = "next_transfer_date"
|
const val nextTransferDateField = "next_transfer_date"
|
||||||
const val transferStarCountField = "transfer_star_count"
|
const val transferStarCountField = "transfer_star_count"
|
||||||
const val lastResaleStarCountField = "last_resale_star_count"
|
const val lastResaleStarCountField = "last_resale_star_count"
|
||||||
@@ -642,6 +649,7 @@ const val mainFrameTimestampField = "main_frame_timestamp"
|
|||||||
|
|
||||||
const val paidMessageStarCountField = "paid_message_star_count"
|
const val paidMessageStarCountField = "paid_message_star_count"
|
||||||
const val paidStarCountField = "paid_star_count"
|
const val paidStarCountField = "paid_star_count"
|
||||||
|
const val isPaidPostField = "is_paid_post"
|
||||||
|
|
||||||
const val disableEditMessageField = "disable_edit_message"
|
const val disableEditMessageField = "disable_edit_message"
|
||||||
const val scoreField = "score"
|
const val scoreField = "score"
|
||||||
@@ -720,6 +728,7 @@ const val starCountField = "star_count"
|
|||||||
const val upgradeStarCountField = "upgrade_star_count"
|
const val upgradeStarCountField = "upgrade_star_count"
|
||||||
const val payToUpgradeField = "pay_for_upgrade"
|
const val payToUpgradeField = "pay_for_upgrade"
|
||||||
const val paidMediaField = "paid_media"
|
const val paidMediaField = "paid_media"
|
||||||
|
const val publisherChatField = "publisher_chat"
|
||||||
|
|
||||||
const val centerColorField = "center_color"
|
const val centerColorField = "center_color"
|
||||||
const val edgeColorField = "edge_color"
|
const val edgeColorField = "edge_color"
|
||||||
@@ -778,6 +787,13 @@ const val rawField = "raw"
|
|||||||
|
|
||||||
const val reactionTypeField = "reaction_type"
|
const val reactionTypeField = "reaction_type"
|
||||||
|
|
||||||
|
const val suggestedPostMessageField = "suggested_post_message"
|
||||||
|
const val priceField = "price"
|
||||||
|
const val sendDateField = "send_date"
|
||||||
|
const val commentField = "comment"
|
||||||
|
const val reasonField = "reason"
|
||||||
|
const val starAmountField = "star_amount"
|
||||||
|
|
||||||
const val isDarkField = "is_dark"
|
const val isDarkField = "is_dark"
|
||||||
const val isFlippedField = "is_flipped"
|
const val isFlippedField = "is_flipped"
|
||||||
const val temperatureField = "temperature"
|
const val temperatureField = "temperature"
|
||||||
|
|||||||
@@ -8,33 +8,33 @@ import kotlinx.serialization.encoding.Decoder
|
|||||||
import kotlinx.serialization.encoding.Encoder
|
import kotlinx.serialization.encoding.Encoder
|
||||||
|
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
@Serializable(DirectMessagesConfigurationChanged.Companion::class)
|
||||||
sealed interface ChannelDirectMessagesConfigurationChanged : ChannelEvent {
|
sealed interface DirectMessagesConfigurationChanged : ChannelEvent {
|
||||||
val enabled: Boolean
|
val enabled: Boolean
|
||||||
val cost: Int?
|
val cost: Int?
|
||||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
@Serializable(DirectMessagesConfigurationChanged.Companion::class)
|
||||||
data object Disabled : ChannelDirectMessagesConfigurationChanged {
|
data object Disabled : DirectMessagesConfigurationChanged {
|
||||||
override val enabled: Boolean
|
override val enabled: Boolean
|
||||||
get() = false
|
get() = false
|
||||||
override val cost: Int?
|
override val cost: Int?
|
||||||
get() = null
|
get() = null
|
||||||
}
|
}
|
||||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
@Serializable(DirectMessagesConfigurationChanged.Companion::class)
|
||||||
data object Free : ChannelDirectMessagesConfigurationChanged {
|
data object Free : DirectMessagesConfigurationChanged {
|
||||||
override val enabled: Boolean
|
override val enabled: Boolean
|
||||||
get() = true
|
get() = true
|
||||||
override val cost: Int
|
override val cost: Int
|
||||||
get() = 0
|
get() = 0
|
||||||
}
|
}
|
||||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
@Serializable(DirectMessagesConfigurationChanged.Companion::class)
|
||||||
data class Paid(
|
data class Paid(
|
||||||
override val cost: Int
|
override val cost: Int
|
||||||
) : ChannelDirectMessagesConfigurationChanged {
|
) : DirectMessagesConfigurationChanged {
|
||||||
override val enabled: Boolean
|
override val enabled: Boolean
|
||||||
get() = true
|
get() = true
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object : KSerializer<ChannelDirectMessagesConfigurationChanged> {
|
companion object : KSerializer<DirectMessagesConfigurationChanged> {
|
||||||
@Serializable
|
@Serializable
|
||||||
private data class RawDirectMessagePriceChanged(
|
private data class RawDirectMessagePriceChanged(
|
||||||
val are_direct_messages_enabled: Boolean = false,
|
val are_direct_messages_enabled: Boolean = false,
|
||||||
@@ -45,7 +45,7 @@ sealed interface ChannelDirectMessagesConfigurationChanged : ChannelEvent {
|
|||||||
|
|
||||||
override fun serialize(
|
override fun serialize(
|
||||||
encoder: Encoder,
|
encoder: Encoder,
|
||||||
value: ChannelDirectMessagesConfigurationChanged
|
value: DirectMessagesConfigurationChanged
|
||||||
) {
|
) {
|
||||||
RawDirectMessagePriceChanged.serializer().serialize(
|
RawDirectMessagePriceChanged.serializer().serialize(
|
||||||
encoder,
|
encoder,
|
||||||
@@ -56,7 +56,7 @@ sealed interface ChannelDirectMessagesConfigurationChanged : ChannelEvent {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): ChannelDirectMessagesConfigurationChanged {
|
override fun deserialize(decoder: Decoder): DirectMessagesConfigurationChanged {
|
||||||
val raw = RawDirectMessagePriceChanged.serializer().deserialize(decoder)
|
val raw = RawDirectMessagePriceChanged.serializer().deserialize(decoder)
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package dev.inmo.tgbotapi.types
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlin.jvm.JvmInline
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
@JvmInline
|
||||||
|
value class DirectMessageThreadId(
|
||||||
|
val long: Long
|
||||||
|
) {
|
||||||
|
override fun toString(): String {
|
||||||
|
return long.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.types
|
|||||||
import dev.inmo.tgbotapi.abstracts.SpoilerableData
|
import dev.inmo.tgbotapi.abstracts.SpoilerableData
|
||||||
import dev.inmo.tgbotapi.types.chat.SuperPublicChat
|
import dev.inmo.tgbotapi.types.chat.SuperPublicChat
|
||||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||||
|
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
|
||||||
import dev.inmo.tgbotapi.types.dice.Dice
|
import dev.inmo.tgbotapi.types.dice.Dice
|
||||||
import dev.inmo.tgbotapi.types.files.*
|
import dev.inmo.tgbotapi.types.files.*
|
||||||
import dev.inmo.tgbotapi.types.games.RawGame
|
import dev.inmo.tgbotapi.types.games.RawGame
|
||||||
@@ -28,9 +29,11 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
@ClassCastsIncluded
|
@ClassCastsIncluded
|
||||||
sealed interface ReplyInfo {
|
sealed interface ReplyInfo {
|
||||||
val messageMeta: Message.MetaInfo?
|
val messageMeta: Message.MetaInfo?
|
||||||
|
val checklistTaskId: ChecklistTaskId?
|
||||||
|
|
||||||
data class Internal(
|
data class Internal(
|
||||||
val message: Message
|
val message: Message,
|
||||||
|
override val checklistTaskId: ChecklistTaskId? = null,
|
||||||
): ReplyInfo {
|
): ReplyInfo {
|
||||||
override val messageMeta: Message.MetaInfo
|
override val messageMeta: Message.MetaInfo
|
||||||
get() = message.metaInfo
|
get() = message.metaInfo
|
||||||
@@ -42,6 +45,8 @@ sealed interface ReplyInfo {
|
|||||||
): ReplyInfo {
|
): ReplyInfo {
|
||||||
override val messageMeta: Message.MetaInfo?
|
override val messageMeta: Message.MetaInfo?
|
||||||
get() = null
|
get() = null
|
||||||
|
override val checklistTaskId: ChecklistTaskId?
|
||||||
|
get() = null
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(External.Companion::class)
|
@Serializable(External.Companion::class)
|
||||||
@@ -57,7 +62,8 @@ sealed interface ReplyInfo {
|
|||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
override val chat: SuperPublicChat?,
|
override val chat: SuperPublicChat?,
|
||||||
override val messageMeta: Message.MetaInfo?,
|
override val messageMeta: Message.MetaInfo?,
|
||||||
val linkPreviewOptions: LinkPreviewOptions?
|
val linkPreviewOptions: LinkPreviewOptions?,
|
||||||
|
override val checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : External
|
) : External
|
||||||
|
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@@ -72,7 +78,8 @@ sealed interface ReplyInfo {
|
|||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
override val chat: SuperPublicChat?,
|
override val chat: SuperPublicChat?,
|
||||||
override val messageMeta: Message.MetaInfo?,
|
override val messageMeta: Message.MetaInfo?,
|
||||||
override val content: ContentVariant
|
override val content: ContentVariant,
|
||||||
|
override val checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : Content
|
) : Content
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -82,7 +89,8 @@ sealed interface ReplyInfo {
|
|||||||
override val chat: SuperPublicChat?,
|
override val chat: SuperPublicChat?,
|
||||||
override val messageMeta: Message.MetaInfo?,
|
override val messageMeta: Message.MetaInfo?,
|
||||||
override val spoilered: Boolean,
|
override val spoilered: Boolean,
|
||||||
override val content: MediaContentVariant
|
override val content: MediaContentVariant,
|
||||||
|
override val checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : Content, SpoilerableData
|
) : Content, SpoilerableData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.TextedInput
|
import dev.inmo.tgbotapi.abstracts.TextedInput
|
||||||
import dev.inmo.tgbotapi.abstracts.WithMessageId
|
import dev.inmo.tgbotapi.abstracts.WithMessageId
|
||||||
|
import dev.inmo.tgbotapi.types.checklists.ChecklistTaskId
|
||||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
@@ -29,7 +30,9 @@ data class ReplyParameters internal constructor(
|
|||||||
@SerialName(quoteEntitiesField)
|
@SerialName(quoteEntitiesField)
|
||||||
private val quoteEntities: List<RawMessageEntity>? = null,
|
private val quoteEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(quotePositionField)
|
@SerialName(quotePositionField)
|
||||||
val quotePosition: Int?
|
val quotePosition: Int? = null,
|
||||||
|
@SerialName(checklistTaskIdField)
|
||||||
|
val checklistTaskId: ChecklistTaskId? = null
|
||||||
) : WithMessageId, TextedInput {
|
) : WithMessageId, TextedInput {
|
||||||
override val text: String?
|
override val text: String?
|
||||||
get() = quote
|
get() = quote
|
||||||
@@ -42,7 +45,8 @@ data class ReplyParameters internal constructor(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
chatIdentifier,
|
chatIdentifier,
|
||||||
messageId,
|
messageId,
|
||||||
@@ -50,30 +54,35 @@ data class ReplyParameters internal constructor(
|
|||||||
entities.makeSourceString(),
|
entities.makeSourceString(),
|
||||||
null,
|
null,
|
||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
metaInfo: Message.MetaInfo,
|
metaInfo: Message.MetaInfo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
metaInfo.chatId,
|
metaInfo.chatId,
|
||||||
metaInfo.messageId,
|
metaInfo.messageId,
|
||||||
entities,
|
entities,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
message: Message,
|
message: Message,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
message.metaInfo,
|
message.metaInfo,
|
||||||
entities,
|
entities,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
chatIdentifier: ChatIdentifier,
|
chatIdentifier: ChatIdentifier,
|
||||||
@@ -81,7 +90,8 @@ data class ReplyParameters internal constructor(
|
|||||||
quote: String,
|
quote: String,
|
||||||
quoteParseMode: ParseMode,
|
quoteParseMode: ParseMode,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
chatIdentifier,
|
chatIdentifier,
|
||||||
messageId,
|
messageId,
|
||||||
@@ -89,40 +99,46 @@ data class ReplyParameters internal constructor(
|
|||||||
quote,
|
quote,
|
||||||
quoteParseMode,
|
quoteParseMode,
|
||||||
null,
|
null,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
metaInfo: Message.MetaInfo,
|
metaInfo: Message.MetaInfo,
|
||||||
quote: String,
|
quote: String,
|
||||||
quoteParseMode: ParseMode,
|
quoteParseMode: ParseMode,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
metaInfo.chatId,
|
metaInfo.chatId,
|
||||||
metaInfo.messageId,
|
metaInfo.messageId,
|
||||||
quote,
|
quote,
|
||||||
quoteParseMode,
|
quoteParseMode,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
message: Message,
|
message: Message,
|
||||||
quote: String,
|
quote: String,
|
||||||
quoteParseMode: ParseMode,
|
quoteParseMode: ParseMode,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
message.metaInfo,
|
message.metaInfo,
|
||||||
quote,
|
quote,
|
||||||
quoteParseMode,
|
quoteParseMode,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
chatIdentifier: ChatIdentifier,
|
chatIdentifier: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
chatIdentifier,
|
chatIdentifier,
|
||||||
messageId,
|
messageId,
|
||||||
@@ -130,25 +146,30 @@ data class ReplyParameters internal constructor(
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
metaInfo: Message.MetaInfo,
|
metaInfo: Message.MetaInfo,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
metaInfo.chatId,
|
metaInfo.chatId,
|
||||||
metaInfo.messageId,
|
metaInfo.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
constructor(
|
constructor(
|
||||||
message: Message,
|
message: Message,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
quotePosition: Int? = null
|
quotePosition: Int? = null,
|
||||||
|
checklistTaskId: ChecklistTaskId? = null,
|
||||||
) : this(
|
) : this(
|
||||||
message.metaInfo,
|
message.metaInfo,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
quotePosition
|
quotePosition,
|
||||||
|
checklistTaskId
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,13 @@ sealed interface SupergroupChat : GroupChat, SuperPublicChat
|
|||||||
@Serializable(ChatSerializer::class)
|
@Serializable(ChatSerializer::class)
|
||||||
sealed interface ForumChat : SupergroupChat
|
sealed interface ForumChat : SupergroupChat
|
||||||
|
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@Serializable(ChatSerializer::class)
|
||||||
|
sealed interface ChannelDirectMessagesChat : SupergroupChat {
|
||||||
|
override val isDirectMessages: Boolean
|
||||||
|
get() = true
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@Serializable(ChatSerializer::class)
|
@Serializable(ChatSerializer::class)
|
||||||
sealed interface PossiblyPremiumChat : Chat {
|
sealed interface PossiblyPremiumChat : Chat {
|
||||||
@@ -69,4 +76,6 @@ sealed interface AbleToAddInAttachmentMenuChat : Chat {
|
|||||||
@ClassCastsIncluded(excludeRegex = ".*Impl")
|
@ClassCastsIncluded(excludeRegex = ".*Impl")
|
||||||
sealed interface Chat {
|
sealed interface Chat {
|
||||||
val id: IdChatIdentifier
|
val id: IdChatIdentifier
|
||||||
|
val isDirectMessages: Boolean
|
||||||
|
get() = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,16 +77,17 @@ object ChatSerializer : KSerializer<Chat> {
|
|||||||
} catch (_: SerializationException) {
|
} catch (_: SerializationException) {
|
||||||
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
||||||
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
|
val isDirectMessages = decodedJson[isDirectMessagesField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
val original = decodedJson[originField]
|
val original = decodedJson[originField]
|
||||||
|
|
||||||
when (type) {
|
when (type) {
|
||||||
ChatType.Sender -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
ChatType.Sender -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Private -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
ChatType.Private -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Group -> formatter.decodeFromJsonElement(GroupChatImpl.serializer(), decodedJson)
|
ChatType.Group -> formatter.decodeFromJsonElement(GroupChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Supergroup -> if (isForum) {
|
ChatType.Supergroup -> when {
|
||||||
formatter.decodeFromJsonElement(ForumChatImpl.serializer(), decodedJson)
|
isForum -> formatter.decodeFromJsonElement(ForumChatImpl.serializer(), decodedJson)
|
||||||
} else {
|
isDirectMessages -> formatter.decodeFromJsonElement(ChannelDirectMessagesChatImpl.serializer(), decodedJson)
|
||||||
formatter.decodeFromJsonElement(SupergroupChatImpl.serializer(), decodedJson)
|
else -> formatter.decodeFromJsonElement(SupergroupChatImpl.serializer(), decodedJson)
|
||||||
}
|
}
|
||||||
ChatType.Channel -> formatter.decodeFromJsonElement(ChannelChatImpl.serializer(), decodedJson)
|
ChatType.Channel -> formatter.decodeFromJsonElement(ChannelChatImpl.serializer(), decodedJson)
|
||||||
is ChatType.Unknown -> UnknownChatType(
|
is ChatType.Unknown -> UnknownChatType(
|
||||||
@@ -123,16 +124,19 @@ object PreviewChatSerializer : KSerializer<PreviewChat> {
|
|||||||
|
|
||||||
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
||||||
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
|
val isChannelDirectMessages = decodedJson[isDirectMessagesField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
val original = decodedJson[originField]
|
val original = decodedJson[originField]
|
||||||
|
|
||||||
return when (type) {
|
return when (type) {
|
||||||
ChatType.Sender -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
ChatType.Sender -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Private -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
ChatType.Private -> formatter.decodeFromJsonElement(PrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Group -> formatter.decodeFromJsonElement(GroupChatImpl.serializer(), decodedJson)
|
ChatType.Group -> formatter.decodeFromJsonElement(GroupChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Supergroup -> if (isForum) {
|
ChatType.Supergroup -> {
|
||||||
formatter.decodeFromJsonElement(ForumChatImpl.serializer(), decodedJson)
|
when {
|
||||||
} else {
|
isForum -> formatter.decodeFromJsonElement(ForumChatImpl.serializer(), decodedJson)
|
||||||
formatter.decodeFromJsonElement(SupergroupChatImpl.serializer(), decodedJson)
|
isChannelDirectMessages -> formatter.decodeFromJsonElement(ChannelDirectMessagesChatImpl.serializer(), decodedJson)
|
||||||
|
else -> formatter.decodeFromJsonElement(SupergroupChatImpl.serializer(), decodedJson)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ChatType.Channel -> formatter.decodeFromJsonElement(ChannelChatImpl.serializer(), decodedJson)
|
ChatType.Channel -> formatter.decodeFromJsonElement(ChannelChatImpl.serializer(), decodedJson)
|
||||||
is ChatType.Unknown -> UnknownChatType(
|
is ChatType.Unknown -> UnknownChatType(
|
||||||
@@ -156,6 +160,7 @@ object PreviewChatSerializer : KSerializer<PreviewChat> {
|
|||||||
is GroupChatImpl -> GroupChatImpl.serializer().serialize(encoder, value)
|
is GroupChatImpl -> GroupChatImpl.serializer().serialize(encoder, value)
|
||||||
is SupergroupChatImpl -> SupergroupChatImpl.serializer().serialize(encoder, value)
|
is SupergroupChatImpl -> SupergroupChatImpl.serializer().serialize(encoder, value)
|
||||||
is ForumChatImpl -> ForumChatImpl.serializer().serialize(encoder, value)
|
is ForumChatImpl -> ForumChatImpl.serializer().serialize(encoder, value)
|
||||||
|
is ChannelDirectMessagesChatImpl -> ChannelDirectMessagesChatImpl.serializer().serialize(encoder, value)
|
||||||
is ChannelChatImpl -> ChannelChatImpl.serializer().serialize(encoder, value)
|
is ChannelChatImpl -> ChannelChatImpl.serializer().serialize(encoder, value)
|
||||||
is CommonBot -> CommonBot.serializer().serialize(encoder, value)
|
is CommonBot -> CommonBot.serializer().serialize(encoder, value)
|
||||||
is CommonUser -> CommonUser.serializer().serialize(encoder, value)
|
is CommonUser -> CommonUser.serializer().serialize(encoder, value)
|
||||||
@@ -174,16 +179,19 @@ sealed class ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
|||||||
|
|
||||||
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
val type = decodedJson[typeField] ?.jsonPrimitive ?.content ?.asChatType
|
||||||
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
val isForum = decodedJson[isForumField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
|
val isChannelDirectMessages = decodedJson[isDirectMessagesField] ?.jsonPrimitive ?.booleanOrNull == true
|
||||||
val original = decodedJson[originField]
|
val original = decodedJson[originField]
|
||||||
|
|
||||||
return when (type) {
|
return when (type) {
|
||||||
ChatType.Sender -> formatter.decodeFromJsonElement(ExtendedPrivateChatImpl.serializer(), decodedJson)
|
ChatType.Sender -> formatter.decodeFromJsonElement(ExtendedPrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Private -> formatter.decodeFromJsonElement(ExtendedPrivateChatImpl.serializer(), decodedJson)
|
ChatType.Private -> formatter.decodeFromJsonElement(ExtendedPrivateChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Group -> formatter.decodeFromJsonElement(ExtendedGroupChatImpl.serializer(), decodedJson)
|
ChatType.Group -> formatter.decodeFromJsonElement(ExtendedGroupChatImpl.serializer(), decodedJson)
|
||||||
ChatType.Supergroup -> if (isForum) {
|
ChatType.Supergroup -> {
|
||||||
formatter.decodeFromJsonElement(ExtendedForumChatImpl.serializer(), decodedJson)
|
when {
|
||||||
} else {
|
isForum -> formatter.decodeFromJsonElement(ExtendedForumChatImpl.serializer(), decodedJson)
|
||||||
formatter.decodeFromJsonElement(ExtendedSupergroupChatImpl.serializer(), decodedJson)
|
isChannelDirectMessages -> formatter.decodeFromJsonElement(ExtendedChannelDirectMessagesChatImpl.serializer(), decodedJson)
|
||||||
|
else -> formatter.decodeFromJsonElement(ExtendedSupergroupChatImpl.serializer(), decodedJson)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ChatType.Channel -> formatter.decodeFromJsonElement(ExtendedChannelChatImpl.serializer(), decodedJson)
|
ChatType.Channel -> formatter.decodeFromJsonElement(ExtendedChannelChatImpl.serializer(), decodedJson)
|
||||||
is ChatType.Unknown -> UnknownExtendedChat(
|
is ChatType.Unknown -> UnknownExtendedChat(
|
||||||
@@ -207,6 +215,7 @@ sealed class ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
|||||||
is ExtendedGroupChatImpl -> ExtendedGroupChatImpl.serializer().serialize(encoder, value)
|
is ExtendedGroupChatImpl -> ExtendedGroupChatImpl.serializer().serialize(encoder, value)
|
||||||
is ExtendedSupergroupChatImpl -> ExtendedSupergroupChatImpl.serializer().serialize(encoder, value)
|
is ExtendedSupergroupChatImpl -> ExtendedSupergroupChatImpl.serializer().serialize(encoder, value)
|
||||||
is ExtendedForumChatImpl -> ExtendedForumChatImpl.serializer().serialize(encoder, value)
|
is ExtendedForumChatImpl -> ExtendedForumChatImpl.serializer().serialize(encoder, value)
|
||||||
|
is ExtendedChannelDirectMessagesChatImpl -> ExtendedChannelDirectMessagesChatImpl.serializer().serialize(encoder, value)
|
||||||
is ExtendedChannelChatImpl -> ExtendedChannelChatImpl.serializer().serialize(encoder, value)
|
is ExtendedChannelChatImpl -> ExtendedChannelChatImpl.serializer().serialize(encoder, value)
|
||||||
is ExtendedBot -> ExtendedBot.serializer().serialize(encoder, value)
|
is ExtendedBot -> ExtendedBot.serializer().serialize(encoder, value)
|
||||||
is UnknownExtendedChat -> JsonObject.serializer().serialize(encoder, value.rawJson)
|
is UnknownExtendedChat -> JsonObject.serializer().serialize(encoder, value.rawJson)
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.chat
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.abstracts.OptionallyWithUser
|
||||||
|
import dev.inmo.tgbotapi.types.DirectMessageThreadId
|
||||||
|
import dev.inmo.tgbotapi.types.topicIdField
|
||||||
|
import dev.inmo.tgbotapi.types.userField
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class DirectMessagesTopic(
|
||||||
|
@SerialName(topicIdField)
|
||||||
|
val threadId: DirectMessageThreadId,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(userField)
|
||||||
|
override val user: PreviewUser? = null,
|
||||||
|
) : OptionallyWithUser
|
||||||
@@ -10,6 +10,8 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
|
|||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
|
import kotlinx.serialization.EncodeDefault
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
@@ -305,6 +307,84 @@ data class ExtendedForumChatImpl(
|
|||||||
override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(),
|
override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(),
|
||||||
) : ExtendedForumChat
|
) : ExtendedForumChat
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
@RiskFeature("This class is a subject of changes. It is better to use ExtendedForumChat due")
|
||||||
|
data class ExtendedChannelDirectMessagesChatImpl(
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(idField)
|
||||||
|
override val id: IdChatIdentifier,
|
||||||
|
@SerialName(titleField)
|
||||||
|
override val title: String,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(parentChatField)
|
||||||
|
override val channelChat: PreviewChannelChat,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(usernameField)
|
||||||
|
override val username: Username? = null,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(activeUsernamesField)
|
||||||
|
override val activeUsernames: List<Username> = emptyList(),
|
||||||
|
@SerialName(photoField)
|
||||||
|
override val chatPhoto: ChatPhoto? = null,
|
||||||
|
@SerialName(permissionsField)
|
||||||
|
override val permissions: ChatPermissions,
|
||||||
|
@SerialName(descriptionField)
|
||||||
|
override val description: String = "",
|
||||||
|
@SerialName(inviteLinkField)
|
||||||
|
override val inviteLink: String? = null,
|
||||||
|
@SerialName(pinnedMessageField)
|
||||||
|
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||||
|
override val pinnedMessage: Message? = null,
|
||||||
|
@SerialName(stickerSetNameFullField)
|
||||||
|
override val stickerSetName: StickerSetName? = null,
|
||||||
|
@SerialName(slowModeDelayField)
|
||||||
|
override val slowModeDelay: Long? = null,
|
||||||
|
@SerialName(canSetStickerSetField)
|
||||||
|
override val canSetStickerSet: Boolean = false,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(linkedChatIdField)
|
||||||
|
override val linkedChannelChatId: IdChatIdentifier? = null,
|
||||||
|
@SerialName(locationField)
|
||||||
|
override val location: ChatLocation? = null,
|
||||||
|
@SerialName(joinToSendMessagesField)
|
||||||
|
override val requiresJoinForMessaging: Boolean = false,
|
||||||
|
@SerialName(joinByRequestField)
|
||||||
|
override val requireAdminApproveToJoin: Boolean = false,
|
||||||
|
@SerialName(hasAggressiveAntiSpamEnabledField)
|
||||||
|
override val isAggressiveAntiSpamEnabled: Boolean = false,
|
||||||
|
@SerialName(hasHiddenMembersField)
|
||||||
|
override val membersHidden: Boolean = false,
|
||||||
|
@SerialName(availableReactionsField)
|
||||||
|
override val availableReactions: List<Reaction>? = null,
|
||||||
|
@SerialName(emojiStatusCustomEmojiIdField)
|
||||||
|
override val statusEmojiId: CustomEmojiId? = null,
|
||||||
|
@SerialName(emojiStatusExpirationDateField)
|
||||||
|
override val statusEmojiExpiration: TelegramDate? = null,
|
||||||
|
@SerialName(accentColorIdField)
|
||||||
|
override val accentColorId: ColorId = ColorId(0),
|
||||||
|
@SerialName(profileAccentColorIdField)
|
||||||
|
override val profileAccentColorId: ColorId? = null,
|
||||||
|
@SerialName(backgroundCustomEmojiIdField)
|
||||||
|
override val backgroundCustomEmojiId: CustomEmojiId? = null,
|
||||||
|
@SerialName(profileBackgroundCustomEmojiIdField)
|
||||||
|
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null,
|
||||||
|
@SerialName(hasVisibleHistoryField)
|
||||||
|
override val newMembersSeeHistory: Boolean = false,
|
||||||
|
@SerialName(unrestrictBoostsCountField)
|
||||||
|
override val unrestrictBoostsCount: Int? = null,
|
||||||
|
@SerialName(customEmojiStickerSetNameField)
|
||||||
|
override val customEmojiStickerSetName: StickerSetName? = null,
|
||||||
|
@SerialName(maxReactionCountField)
|
||||||
|
override val maxReactionsCount: Int = 3,
|
||||||
|
@SerialName(acceptedGiftTypesField)
|
||||||
|
override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(),
|
||||||
|
) : ExtendedChannelDirectMessagesChat {
|
||||||
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
@SerialName(isDirectMessagesField)
|
||||||
|
@EncodeDefault
|
||||||
|
override val isDirectMessages: Boolean = true
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ExtendedBot(
|
data class ExtendedBot(
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
|||||||
@@ -114,6 +114,12 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
|
|||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
|
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
|
||||||
|
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@Serializable(PreviewChatSerializer::class)
|
||||||
|
sealed interface ExtendedChannelDirectMessagesChat : ExtendedSupergroupChat, ChannelDirectMessagesChat {
|
||||||
|
val channelChat: PreviewChannelChat
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import dev.inmo.micro_utils.language_codes.IetfLangSerializer
|
|||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
|
import kotlinx.serialization.EncodeDefault
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@@ -70,6 +71,24 @@ data class ForumChatImpl(
|
|||||||
override val username: Username? = null
|
override val username: Username? = null
|
||||||
) : PreviewForumChat
|
) : PreviewForumChat
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
@RiskFeature("This class is a subject of changes. It is better to use ForumChat due")
|
||||||
|
data class ChannelDirectMessagesChatImpl(
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(idField)
|
||||||
|
override val id: IdChatIdentifier,
|
||||||
|
@SerialName(titleField)
|
||||||
|
override val title: String,
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@SerialName(usernameField)
|
||||||
|
override val username: Username? = null
|
||||||
|
) : PreviewChannelDirectMessagesChat {
|
||||||
|
@Suppress("OPT_IN_USAGE")
|
||||||
|
@SerialName(isDirectMessagesField)
|
||||||
|
@EncodeDefault
|
||||||
|
override val isDirectMessages: Boolean = true
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@RiskFeature("This class is a subject of changes. It is better to use ChannelChat due")
|
@RiskFeature("This class is a subject of changes. It is better to use ChannelChat due")
|
||||||
data class ChannelChatImpl(
|
data class ChannelChatImpl(
|
||||||
|
|||||||
@@ -40,3 +40,7 @@ sealed interface PreviewSupergroupChat : PreviewGroupChat, PreviewSuperPublicCha
|
|||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
@Serializable(PreviewChatSerializer::class)
|
@Serializable(PreviewChatSerializer::class)
|
||||||
sealed interface PreviewForumChat : PreviewSupergroupChat, ForumChat
|
sealed interface PreviewForumChat : PreviewSupergroupChat, ForumChat
|
||||||
|
|
||||||
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
|
@Serializable(PreviewChatSerializer::class)
|
||||||
|
sealed interface PreviewChannelDirectMessagesChat : PreviewSupergroupChat, ChannelDirectMessagesChat
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ data class AdministratorChatMemberImpl(
|
|||||||
@SerialName(canEditStoriesField)
|
@SerialName(canEditStoriesField)
|
||||||
override val canEditStories: Boolean = false,
|
override val canEditStories: Boolean = false,
|
||||||
@SerialName(canDeleteStoriesField)
|
@SerialName(canDeleteStoriesField)
|
||||||
override val canDeleteStories: Boolean = false
|
override val canDeleteStories: Boolean = false,
|
||||||
|
@SerialName(canManageDirectMessagesField)
|
||||||
|
override val canManageDirectMessages: Boolean = false,
|
||||||
) : AdministratorChatMember {
|
) : AdministratorChatMember {
|
||||||
@SerialName(statusField)
|
@SerialName(statusField)
|
||||||
@Required
|
@Required
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ sealed interface ChatAdministratorRights : SpecialChatAdministratorRights {
|
|||||||
val canPostStories: Boolean
|
val canPostStories: Boolean
|
||||||
val canEditStories: Boolean
|
val canEditStories: Boolean
|
||||||
val canDeleteStories: Boolean
|
val canDeleteStories: Boolean
|
||||||
|
val canManageDirectMessages: Boolean
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
operator fun invoke(
|
operator fun invoke(
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user