mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-09-13 11:34:13 +00:00
update readmes
This commit is contained in:
@@ -10,6 +10,15 @@ import dev.inmo.tgbotapi.requests.abstracts.asMultipartFile
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
/**
|
||||
* Starts a long-polling bot that uses each incoming photo as the avatar of the chat where it was sent.
|
||||
*
|
||||
* The bot downloads the photo and uploads it with `setChatPhoto`. It replies `Done` when the avatar is updated;
|
||||
* if that API call fails, it logs the exception and replies with an error message. The target must be a
|
||||
* non-private chat where the bot is an administrator allowed to change chat information.
|
||||
*
|
||||
* @param args command-line arguments whose first value is the Bot API token
|
||||
*/
|
||||
suspend fun main(args: Array<String>) {
|
||||
val bot = telegramBot(args.first())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user