java-telegram-bot-api
java-telegram-bot-api copied to clipboard
Make a sweet API
Call all methods as bot methods:
SendResponse response = bot.sendMessage(chatId, "Hello")
.parseMode(ParseMode.Markdown)
.execute();
Async
bot.sendMessage(chatId, "Hello")
.parseMode(ParseMode.Markdown)
.execute(callback);
execute(callback) or execute(onSuccess, onFailure)?
Think there should be both methods, first for those on j7 with anonymous inner classes and second for j8 coders, who can use lambdas (because two aic'es will look terrible) :thinking:
Call all methods as bot methods:
SendResponse response = bot.sendMessage(chatId, "Hello") .parseMode(ParseMode.Markdown) .execute();Async
bot.sendMessage(chatId, "Hello") .parseMode(ParseMode.Markdown) .execute(callback);
execute(callback)orexecute(onSuccess, onFailure)?
I'll work on it :)
The change is ready guys :)