com.pengrad.telegrambot.request.EditMessageText Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-telegram-bot-api Show documentation
Show all versions of java-telegram-bot-api Show documentation
Java API for Telegram Bot API
package com.pengrad.telegrambot.request;
import com.pengrad.telegrambot.model.MessageEntity;
import com.pengrad.telegrambot.model.request.InlineKeyboardMarkup;
import com.pengrad.telegrambot.model.request.ParseMode;
import com.pengrad.telegrambot.response.BaseResponse;
import com.pengrad.telegrambot.response.SendResponse;
/**
* Stas Parshin
* 07 May 2016
*/
public class EditMessageText extends BaseRequest {
public EditMessageText(Object chatId, int messageId, String text) {
super(SendResponse.class);
add("chat_id", chatId).add("message_id", messageId).add("text", text);
}
public EditMessageText(String inlineMessageId, String text) {
super(BaseResponse.class);
add("inline_message_id", inlineMessageId).add("text", text);
}
public EditMessageText parseMode(ParseMode parseMode) {
return add("parse_mode", parseMode.name());
}
public EditMessageText entities(MessageEntity... entities) {
return add("entities", entities);
}
public EditMessageText disableWebPagePreview(boolean disableWebPagePreview) {
return add("disable_web_page_preview", disableWebPagePreview);
}
public EditMessageText replyMarkup(InlineKeyboardMarkup replyMarkup) {
return add("reply_markup", replyMarkup);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy