Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 559 Bytes

File metadata and controls

25 lines (22 loc) · 559 Bytes

java-TelegramBot

Author: SW-Team

LICENSE

  • org.json - JSON-LICENSE

Usage

Initializing & Start Bot

TelegramBot bot = new TelegramBot("Bot::TOKEN");
bot.setHandler(list -> list.forEach(update -> {
    Message message = update.getMessage();
    //...etc
}));
bot.start();

Send Message

TextMessage message = new TextMessageSender(bot).setText("Hello, World!").setChatId("@username").send();

Get Data

Chat chat = new ChatGetter(bot).getChatId("@username").send();