mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-06-13 06:46:38 +00:00
managed bots improvements
This commit is contained in:
@@ -124,14 +124,16 @@ suspend fun main(vararg args: String) {
|
|||||||
val botChatId = it.chatEvent.bot.id.toChatId()
|
val botChatId = it.chatEvent.bot.id.toChatId()
|
||||||
reply(it, "Managed bot created successfully: ${it.chatEvent.bot}\nBot ID: ${botChatId.chatId.long}")
|
reply(it, "Managed bot created successfully: ${it.chatEvent.bot}\nBot ID: ${botChatId.chatId.long}")
|
||||||
val token = getManagedBotToken(botChatId)
|
val token = getManagedBotToken(botChatId)
|
||||||
reply(it, "Token: $token")
|
val accessSettings = getManagedBotAccessSettings(botChatId)
|
||||||
|
reply(it, "Token: $token; Access settings: $accessSettings")
|
||||||
}
|
}
|
||||||
|
|
||||||
onManagedBotUpdated {
|
onManagedBotUpdated {
|
||||||
val botChatId = it.bot.id.toChatId()
|
val botChatId = it.bot.id.toChatId()
|
||||||
send(it.user, "Managed bot has been updated: ${it.bot}\nBot ID: ${botChatId.chatId.long}")
|
send(it.user, "Managed bot has been updated: ${it.bot}\nBot ID: ${botChatId.chatId.long}")
|
||||||
val token = getManagedBotToken(botChatId)
|
val token = getManagedBotToken(botChatId)
|
||||||
send(it.user, "Token: $token")
|
val accessSettings = getManagedBotAccessSettings(botChatId)
|
||||||
|
send(it.user, "Token: $token; Access settings: $accessSettings")
|
||||||
}
|
}
|
||||||
|
|
||||||
onCommand("replaceToken") {
|
onCommand("replaceToken") {
|
||||||
|
|||||||
Reference in New Issue
Block a user