Package org.telegram.abilitybots.api.bot
Class AbilityWebhookBot
java.lang.Object
org.telegram.telegrambots.meta.bots.AbsSender
org.telegram.telegrambots.bots.DefaultAbsSender
org.telegram.abilitybots.api.bot.BaseAbilityBot
org.telegram.abilitybots.api.bot.AbilityWebhookBot
- All Implemented Interfaces:
AbilityExtension
,org.telegram.telegrambots.meta.generics.TelegramBot
,org.telegram.telegrambots.meta.generics.WebhookBot
public abstract class AbilityWebhookBot
extends BaseAbilityBot
implements org.telegram.telegrambots.meta.generics.WebhookBot
A
WebhookBot
-flavor AbilityBot. It delegates all updates to a TelegramWebhookBot
instance.- Author:
- Abbas Abou Daya
-
Field Summary
Fields inherited from class org.telegram.abilitybots.api.bot.BaseAbilityBot
ADMINS, BLACKLIST, db, DEFAULT, sender, silent, STATS, USER_ID, USERS
Fields inherited from class org.telegram.telegrambots.bots.DefaultAbsSender
exe
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbilityWebhookBot
(String botToken, String botUsername, String botPath) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, DBContext db) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, DBContext db, AbilityToggle toggle) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, DBContext db, AbilityToggle toggle, DefaultBotOptions botOptions) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, DBContext db, DefaultBotOptions options) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, AbilityToggle toggle) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, AbilityToggle toggle, DefaultBotOptions options) protected
AbilityWebhookBot
(String botToken, String botUsername, String botPath, DefaultBotOptions botOptions) -
Method Summary
Modifier and TypeMethodDescriptionorg.telegram.telegrambots.meta.api.methods.BotApiMethod<?>
onWebhookUpdateReceived
(org.telegram.telegrambots.meta.api.objects.Update update) void
setWebhook
(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) Methods inherited from class org.telegram.abilitybots.api.bot.BaseAbilityBot
abilities, addExtension, addExtensions, addExtensions, admins, allowContinuousText, blacklist, checkGlobalFlags, creatorId, db, getBotUsername, getCommandPrefix, getCommandRegexSplit, getPrivacy, isAdmin, isCreator, isGroupAdmin, isGroupAdmin, onRegister, onUpdateReceived, replies, sender, silent, stats, userIds, users
Methods inherited from class org.telegram.telegrambots.bots.DefaultAbsSender
downloadFile, downloadFile, downloadFile, downloadFile, downloadFileAsStream, downloadFileAsStream, downloadFileAsync, downloadFileAsync, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getBaseUrl, getBotToken, getOptions, sendApiMethod, sendApiMethodAsync, sendApiMethodAsync
Methods inherited from class org.telegram.telegrambots.meta.bots.AbsSender
execute, executeAsync, executeAsync, getMe, getMeAsync, getMeAsync, getWebhookInfo, getWebhookInfoAsync, getWebhookInfoAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.telegram.telegrambots.meta.generics.TelegramBot
getBotToken, getBotUsername, onRegister
-
Constructor Details
-
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, DBContext db, AbilityToggle toggle, DefaultBotOptions botOptions) -
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, AbilityToggle toggle, DefaultBotOptions options) -
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, DBContext db, AbilityToggle toggle) -
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, DBContext db, DefaultBotOptions options) -
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, DefaultBotOptions botOptions) -
AbilityWebhookBot
protected AbilityWebhookBot(String botToken, String botUsername, String botPath, AbilityToggle toggle) -
AbilityWebhookBot
-
AbilityWebhookBot
-
-
Method Details
-
onWebhookUpdateReceived
public org.telegram.telegrambots.meta.api.methods.BotApiMethod<?> onWebhookUpdateReceived(org.telegram.telegrambots.meta.api.objects.Update update) - Specified by:
onWebhookUpdateReceived
in interfaceorg.telegram.telegrambots.meta.generics.WebhookBot
-
setWebhook
public void setWebhook(org.telegram.telegrambots.meta.api.methods.updates.SetWebhook setWebhook) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException - Specified by:
setWebhook
in interfaceorg.telegram.telegrambots.meta.generics.WebhookBot
- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
-
getBotPath
- Specified by:
getBotPath
in interfaceorg.telegram.telegrambots.meta.generics.WebhookBot
-