Skip to content

MYnimef/telegrambot-kotlin

Repository files navigation

Supported version

API for creating telegram bot

This API uses Rubenlagus' library for Java.

Adding to your project

To add this API to your project you need to add dependency.

MAVEN

If you use maven, add to pom.xml following text:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.MYnimef</groupId>
    <artifactId>telegrambot-kotlin</artifactId>
    <version>0.0.1</version>
</dependency>

GRADLE

If you use gradle, add to build.gradle following text:

repositories { 
    
    ...
    
    maven { 
        url 'https://jitpack.io'
    }
}

dependencies {
    
    ...
    
    implementation 'com.github.MYnimef:telegrambot-kotlin:0.0.1'
}

Possible problems

If your bot receives/sends messages with text that isn't supported in ANSII, you should add to build.gradle the following lines:

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

Bot initialization

fun main() { 
    val bot = BotCreator("token")
        .start()
}

Bot customization

Credits

About

Telegram Bot API for Kotlin

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages