mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2025-09-06 16:49:22 +00:00
update
This commit is contained in:
@@ -1,38 +1,24 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
|
||||
project.version = "0.1.0"
|
||||
project.group = "com.insanusmokrassar"
|
||||
|
||||
mainClassName="com.insanusmokrassar.examples.ForwarderBotKt"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
||||
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI:$telegram_bot_api_version"
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:$telegram_bot_api_version"
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI-all:$telegram_bot_api_version"
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ suspend fun main(args: Array<String>) {
|
||||
is UserForwardInfo -> forwardInfo.from.let { user ->
|
||||
"User ${user.id.chatId.toString().codeMarkdownV2()} " + "(${user.firstName} ${user.lastName}: ${user.username ?.username ?: "Without username"})".regularMarkdownV2()
|
||||
}
|
||||
is ForwardFromChannelInfo -> "Channel (".regularMarkdownV2() + (forwardInfo.channelChat as ChannelChat).title.codeMarkdownV2() + ")".regularMarkdownV2()
|
||||
is ForwardFromChannelInfo -> "Channel (".regularMarkdownV2() + (forwardInfo.channelChat).title.codeMarkdownV2() + ")".regularMarkdownV2()
|
||||
}
|
||||
} else {
|
||||
"There is no forward info"
|
||||
|
Reference in New Issue
Block a user