Skip to content

Cadiducho/Telegram-Bot-API

Repository files navigation

Simple Telegram Bot API implementation to Java

This API is an unofficial one. Check Telegram Bot API for more info.

License CI Release Sponsors

Usage

import com.cadiducho.telegrambotapi.BotAPI;
import com.cadiducho.telegrambotapi.TelegramBot;
import com.cadiducho.telegrambotapi.api.User;
import com.cadiducho.telegrambotapi.api.exception.TelegramException;

...

static BotAPI telegramBot;

public static void main(String[] args) {
    telegramBot = new TelegramBot("to:kken");
    
    try {
        User user = telegramBot.getMe();
    } catch(TelegramException e) {
        System.out.println("Could'nt get bot instance!");
    }
}

Javadocs

JavaDocs are located in https://cadiducho.com/telegrambotapi

Maven Usage

If you want use Telegram Bot API as a Maven Dependency simply add repo and artifact:

<repository>
    <id>cadiducho-repo-releases</id>
    <name>Cadiducho Repository</name>
    <url>https://repo.cadiducho.com/releases</url>
</repository>

<dependency>
    <groupId>com.cadiducho</groupId>
    <artifactId>TelegramBotAPI</artifactId>
    <version>6.3</version>
</dependency>

You can always check lastest version in my maven repository.

License

This project is released under the MIT-License.

This project starts as a Bukkit-Minecraft API, and now it is a standalone library. Check the original Minegram! Cadiducho's TelegramBotAPI is highly inspired on Irazasyed's Telegram Bot API - PHP SDK and Rainu's telegram-bot-api, but this one is written from scratch.

© 2022 Cadiducho