Clabo

license Build Status Chat Maven Central

Clabo is DSL (Domain-Specific Language) for Kotlin which gives you the easiest way to create bot for Telegram messenger.

Usage

If you use Gradle, you should add the follow config

repositories {
    jcenter()
}
dependencies {
    compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version", //probably, you have the kotlin stdlib dependency
            'com.github.ivan_osipov:clabo:0.0.1', //the clabo dependency
            'ch.qos.logback:logback-classic:1.2.3', //any implementation of logging for slf4j
            'ch.qos.logback:logback-core:1.2.3')
}

The easiest sample of bot that you can implement below. You should change ‘apiKey’ with your value

fun main(args: Array<String>) {
    bot("apiKey") longPolling {
        onStart { command ->
            command.message answer "Hi, ${command.message.from}"
        }
    }
}

The Main Idea

I believe automatization moves the world forward. I believe that a business which really helps people at same time does them happier. I see that support teams, shops and different services which work with bots really simplify life of them customers and I want to see the same convenient customer service everywhere and this project is my contribution in shared interest.

Author

Clabo is developed by Ivan Osipov as free and open source project.

Contribution

There are many features which should be supported. If you have ideas about better DSL, please, feel free to create an issue with a description of your thought and it will be discussed. If you have some code with a new part of DSL, good changes in internal code or fixes for docs, please, feel free to do pull request. More information about contribution you can find in contribution guidelines for this project

Kotlin and Java

Kotlin gives us ability for making projects which will be started on JRE 6. Sometimes there are limitations for launching applications in JRE 8 in production. This project is compiled for JRE 6 and compatible with higher versions as result.

Code Of Conduct

Openness for the dialog opens door for contribution to this project. More information about code of conduct you can find here.

License

Clabo is Open Source which is licensed under the Apache Licenses, version 2.0. It can be freely used in commercial projects.

Dependencies

In this project there is usage of the next libraries:

Directly in library