public abstract class AbilityBot extends BaseAbilityBot implements org.telegram.telegrambots.meta.generics.LongPollingBot
LongPollingBot. It delegates all updates to a TelegramLongPollingBot instance.ADMINS, BACKUP, BAN, BLACKLIST, CLAIM, COMMANDS, db, DEFAULT, DEMOTE, PROMOTE, RECOVER, REPORT, sender, silent, UNBAN, USER_ID, USERSexe| Modifier | Constructor and Description |
|---|---|
protected |
AbilityBot(String botToken,
String botUsername) |
protected |
AbilityBot(String botToken,
String botUsername,
DBContext db) |
protected |
AbilityBot(String botToken,
String botUsername,
DBContext db,
DefaultBotOptions botOptions) |
protected |
AbilityBot(String botToken,
String botUsername,
DefaultBotOptions botOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearWebhook() |
void |
onUpdateReceived(org.telegram.telegrambots.meta.api.objects.Update update)
This method contains the stream of actions that are applied on any update.
|
abilities, admins, backupDB, banUser, blacklist, checkGlobalFlags, claimCreator, commands, creatorId, demoteAdmin, getBotToken, getBotUsername, getUser, getUser, getUserIdSendError, promoteAdmin, recoverDB, replies, reportCommands, unbanUser, userIds, usersdownloadFile, downloadFile, downloadFileAsync, downloadFileAsync, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, getBaseUrl, getOptions, sendApiMethod, sendApiMethodAsyncexecute, executeAsync, getMe, getMeAsync, getWebhookInfo, getWebhookInfoAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBotToken, getBotUsername, getOptions, onClosing, onUpdatesReceivedprotected AbilityBot(String botToken, String botUsername, DBContext db, DefaultBotOptions botOptions)
protected AbilityBot(String botToken, String botUsername, DefaultBotOptions botOptions)
public void onUpdateReceived(org.telegram.telegrambots.meta.api.objects.Update update)
BaseAbilityBotIt will correctly handle addition of users into the DB and the execution of abilities and replies.
onUpdateReceived in interface org.telegram.telegrambots.meta.generics.LongPollingBotonUpdateReceived in class BaseAbilityBotupdate - the update received by Telegram's APIpublic void clearWebhook()
throws org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException
clearWebhook in interface org.telegram.telegrambots.meta.generics.LongPollingBotorg.telegram.telegrambots.meta.exceptions.TelegramApiRequestExceptionCopyright © 2019. All rights reserved.