Search in sources :

Example 11 with SendMessage

use of org.telegram.telegrambots.api.methods.send.SendMessage in project telegram-notifications-plugin by jenkinsci.

the class StartCommand method execute.

@Override
public void execute(AbsSender absSender, User user, Chat chat, String[] strings) {
    SendMessage answer = new SendMessage();
    answer.setChatId(chat.getId().toString());
    answer.setText(botStrings.get("message.help"));
    try {
        absSender.execute(answer);
    } catch (TelegramApiException e) {
        BotLogger.error(LOG_TAG, e);
    }
}
Also used : TelegramApiException(org.telegram.telegrambots.exceptions.TelegramApiException) SendMessage(org.telegram.telegrambots.api.methods.send.SendMessage)

Aggregations

SendMessage (org.telegram.telegrambots.api.methods.send.SendMessage)11 TelegramApiException (org.telegram.telegrambots.exceptions.TelegramApiException)6 Subscribers (jenkinsci.plugins.telegrambot.users.Subscribers)3 Dataset (org.apache.jena.query.Dataset)3 DefaultNeedModelWrapper (won.protocol.util.DefaultNeedModelWrapper)3