We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dae649 commit ebd03efCopy full SHA for ebd03ef
src/main/kotlin/Config.kt.example
src/main/kotlin/Main.kt
@@ -25,7 +25,14 @@ data class JoinRequest(
25
suspend fun main(vararg args: String) {
26
val map = HashMap<ChatIdentifier, JoinRequest>()
27
28
- telegramBotWithBehaviourAndLongPolling(Config.botToken, CoroutineScope(Dispatchers.IO)) {
+ if (args.size != 1){
29
+ println("Invalid BotToken")
30
+ return
31
+ }
32
+
33
+ println("BotToken: ${args[0]}")
34
35
+ telegramBotWithBehaviourAndLongPolling(args[0], CoroutineScope(Dispatchers.IO)) {
36
onChatJoinRequest {
37
val model = getModel(it.from?.asCommonUser()?.ietfLanguageCode?.code)
38
val password = abs(it.chat.id.chatId).toString()
0 commit comments