mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template.git
synced 2024-11-26 03:58:48 +00:00
Update App.kt
This commit is contained in:
parent
ea4a906e9a
commit
699b58f952
@ -16,7 +16,7 @@ suspend fun main(args: Array<String>) {
|
|||||||
// create json to decode config
|
// create json to decode config
|
||||||
val json = Json { ignoreUnknownKeys = true }
|
val json = Json { ignoreUnknownKeys = true }
|
||||||
// decode config
|
// decode config
|
||||||
val config: Config = json.decodeFromString(Config.serializer(), File(args.first).readText())
|
val config: Config = json.decodeFromString(Config.serializer(), File(args.first()).readText())
|
||||||
// that is your bot
|
// that is your bot
|
||||||
val bot = telegramBot(config.token)
|
val bot = telegramBot(config.token)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user