add GetMe bot and fix some other bots
This commit is contained in:
parent
0517f451f1
commit
d853b6a284
|
@ -0,0 +1,9 @@
|
||||||
|
# GetMeBot
|
||||||
|
|
||||||
|
This is one of the most easiest bot - it will just print information about itself
|
||||||
|
|
||||||
|
## Launch
|
||||||
|
|
||||||
|
```bash
|
||||||
|
../gradlew run --args="BOT_TOKEN"
|
||||||
|
```
|
|
@ -0,0 +1,24 @@
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'kotlin'
|
||||||
|
apply plugin: 'application'
|
||||||
|
|
||||||
|
mainClassName="HelloBotKt"
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
|
||||||
|
implementation "com.github.insanusmokrassar:TelegramBotAPI-all:$telegram_bot_api_version"
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.getMe
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.telegramBot
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is one of the most easiest bot - it will just print information about itself
|
||||||
|
*/
|
||||||
|
suspend fun main(vararg args: String) {
|
||||||
|
val botToken = args.first()
|
||||||
|
|
||||||
|
val bot = telegramBot(botToken)
|
||||||
|
|
||||||
|
println(bot.getMe())
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
# ForwarderBot
|
# HelloBot
|
||||||
|
|
||||||
The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
|
The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@ import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
|
||||||
|
*/
|
||||||
suspend fun main(vararg args: String) {
|
suspend fun main(vararg args: String) {
|
||||||
val botToken = args.first()
|
val botToken = args.first()
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
include ":ForwarderBot"
|
include ":ForwarderBot"
|
||||||
include ":RandomFileSenderBot"
|
include ":RandomFileSenderBot"
|
||||||
include ":HelloBot"
|
include ":HelloBot"
|
||||||
|
include ":GetMeBot"
|
||||||
|
|
Loading…
Reference in New Issue