public class Bot
extends org.telegram.telegrambots.bots.TelegramLongPollingBot
| Constructor and Description |
|---|
Bot(java.lang.String username,
java.lang.String apiKey,
java.util.List<Module> modules)
For testing, run a bot with a predefined set of modules
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableModule(Module module) |
void |
enableModule(Module module) |
java.lang.String |
getBotToken() |
java.lang.String |
getBotUsername() |
java.util.List<ModuleInfo> |
getModules() |
void |
onClosing() |
void |
onUpdateReceived(org.telegram.telegrambots.api.objects.Update update) |
void |
saveModuleStates() |
addStickerToSet, createNewStickerSet, downloadFile, downloadFile, downloadFileAsync, downloadFileAsync, getBaseUrl, sendApiMethod, sendApiMethodAsync, sendAudio, sendDocument, sendMediaGroup, sendPhoto, sendSticker, sendVideo, sendVideoNote, sendVoice, setChatPhoto, uploadStickerFileanswerCallbackQuery, answerCallbackQueryAsync, answerInlineQuery, answerInlineQueryAsync, answerPreCheckoutQuery, answerPreCheckoutQuery, answerShippingQuery, answerShippingQuery, deleteChatPhoto, deleteChatPhoto, deleteMessage, deleteMessage, deleteWebhook, deleteWebhook, editMessageCaption, editMessageCaptionAsync, editMessageReplyMarkup, editMessageReplyMarkup, editMessageText, editMessageTextAsync, execute, executeAsync, exportChatInviteLink, exportChatInviteLinkAsync, forwardMessage, forwardMessageAsync, getChat, getChatAdministrators, getChatAdministratorsAsync, getChatAsync, getChatMember, getChatMemberAsync, getChatMemberCount, getChatMemberCountAsync, getFile, getFileAsync, getGameHighScores, getGameHighScoresAsync, getMe, getMeAsync, getUserProfilePhotos, getUserProfilePhotosAsync, getWebhookInfo, getWebhookInfoAsync, kickMember, kickMemberAsync, leaveChat, leaveChatAsync, pinChatMessage, pinChatMessage, promoteChatMember, promoteChatMember, restrictChatMember, restrictChatMember, sendChatAction, sendChatActionAsync, sendContact, sendContactAsync, sendGame, sendGameAsync, sendInvoice, sendInvoice, sendLocation, sendLocationAsync, sendMessage, sendMessageAsync, sendVenue, sendVenueAsync, setChatDescription, setChatDescription, setChatTitle, setChatTitle, setGameScore, setGameScoreAsync, unbanMember, unbanMemberAsync, unpinChatMessage, unpinChatMessagepublic Bot(java.lang.String username,
java.lang.String apiKey,
java.util.List<Module> modules)
public void onUpdateReceived(org.telegram.telegrambots.api.objects.Update update)
public java.lang.String getBotUsername()
public java.lang.String getBotToken()
getBotToken in interface org.telegram.telegrambots.generics.LongPollingBotgetBotToken in class org.telegram.telegrambots.bots.DefaultAbsSenderpublic void onClosing()
onClosing in interface org.telegram.telegrambots.generics.LongPollingBotonClosing in class org.telegram.telegrambots.bots.TelegramLongPollingBotpublic void enableModule(Module module)
public void disableModule(Module module)
public java.util.List<ModuleInfo> getModules()
public void saveModuleStates()