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.LinkPreviewOptions;
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 linkPreviewOptions(LinkPreviewOptions linkPreviewOptions) {
return add("link_preview_options", linkPreviewOptions);
}
/*
@deprecated Use linkPreviewOptions instead
*/
public EditMessageText disableWebPagePreview(boolean disableWebPagePreview) {
return add("disable_web_page_preview", disableWebPagePreview);
}
public EditMessageText replyMarkup(InlineKeyboardMarkup replyMarkup) {
return add("reply_markup", replyMarkup);
}
public EditMessageText businessConnectionId(String businessConnectionId) {
return add("business_connection_id", businessConnectionId);
}
}