use of com.pengrad.telegrambot.response.SendResponse in project anton-pavlovich-bot by wyvie.
the class SlovnikCommand method sendMessage.
private void sendMessage(long chatId, String messageText, ParseMode parseMode) {
logger.debug("going to send message: " + messageText + " message size: " + messageText.length());
SendMessage sendMessage = new SendMessage(chatId, messageText);
if (parseMode != null) {
sendMessage = sendMessage.parseMode(parseMode).disableWebPagePreview(true);
}
SendResponse response = telegramBot.execute(sendMessage);
}
use of com.pengrad.telegrambot.response.SendResponse in project anton-pavlovich-bot by wyvie.
the class WikiCommand method sendMessage.
private void sendMessage(long chatId, String errorText) {
SendMessage sendMessage = new SendMessage(chatId, errorText);
SendResponse response = telegramBot.execute(sendMessage);
}
Aggregations