Programming language: Kotlin
License: Apache License 2.0
Tags: Tools     Kotlin     KotlinJVM     Telegram-bot-api     Telegram     Bot    
Latest version: v2.3.2

Kotlin Telegram Bot alternatives and similar libraries

Based on the "Tools" category.
Alternatively, view telegram-bot alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Kotlin Telegram Bot or a related project?

Add another 'Tools' Library


Telegram bot api library logo

Telegram Bot

Maven Central Supported version

KDocs Awesome Kotlin Badge Chat in Telegram

Kotlin based wrapper over Telegram API.


Add the MavenCentral repository to your root build.gradle.kts file:

repositories {

Now add the library itself to the dependencies' module that you need it.

dependencies {


You can see the samples in the telegram-bot_template repository. In the basic branch itself there is an empty draft that can be used to create any bot you want.

there you can find in the appropriate branches:


fun main() = runBlocking {
    val bot = TelegramBot("BOT_TOKEN", "com.example.controllers")
     * Second parameter is the package in which commands/inputs will be searched.

    // start long-polling listener

suspend fun start(user: User, bot: TelegramBot) {
    message { "Hello, what's your name?" }.send(user, bot)
    bot.inputListener.set(user.id, "conversation")

suspend fun startConversation(user: User, bot: TelegramBot) {
    message { "Nice to meet you, ${message.text}" }.send(user, bot)
    message { "What is your favorite food?" }.send(user, bot)
    bot.inputListener.set(user.id, "conversation-2step")

It is also possible to process updates manually:

fun main() = runBlocking {
    val bot = TelegramBot("BOT_TOKEN")

    bot.handleUpdates { update ->
        onCommand("/start") {
            message { "Hello, what's your name?" }.send(user, bot)
            bot.inputListener.set(user.id, "conversation")
        inputChain("conversation") {
            message { "Nice to meet you, ${message.text}" }.send(user, bot)
            message { "What is your favorite food?" }.send(user, bot)
        }.breakIf({ message.text == "peanut butter" }) { // chain break condition
            message { "Oh, too bad, I'm allergic to it." }.send(user, bot)
            // action that will be applied when match
        }.andThen {
            // ...

You can also change additional parameters of the bot:

// ...
val bot = TelegramBot("BOT_TOKEN") {
    inputListener = RedisInputListenerImpl()
    classManager = KoinClassManagerImpl()
    logging {
        botLogLevel = Level.DEBUG
// ...

A more complete list of settings can be found in BotConfiguration class.

It is also possible to do more advanced processing with a manual listener setting with bot.update.setListener {} function.

for webhook handling you can use any server and bot.update.handle() function (or use this function if you're directly setting listener), \ and for set webhook you can use this method:


if you want to operate with response you can use sendAsync() instead of send() method, which returns Response:

message { "test" }.sendAsync(user, bot).await().onFailure {
    println("code: ${it.errorCode} description: ${it.description}")

Any async request returns a Response on which you can also use methods getOrNull() , isSuccess() , onFailure() .

More about

You can also read more information in the wiki, and you're always welcome in chat.