public interface LongPollingBot
Modifier and Type | Method and Description |
---|---|
void |
clearWebhook()
Clear current webhook (if present) calling setWebhook method with empty url.
|
String |
getBotToken()
Return bot token to access Telegram API
|
String |
getBotUsername()
Return bot username of this bot
|
BotOptions |
getOptions()
Gets options for current bot
|
default void |
onClosing()
Called when the BotSession is being closed
|
void |
onUpdateReceived(Update update)
This method is called when receiving updates via GetUpdates method
|
default void |
onUpdatesReceived(List<Update> updates)
This method is called when receiving updates via GetUpdates method.
|
void onUpdateReceived(Update update)
update
- Update receiveddefault void onUpdatesReceived(List<Update> updates)
onUpdateReceived(Update)
updates
- list of Update receivedString getBotUsername()
String getBotToken()
BotOptions getOptions()
void clearWebhook() throws TelegramApiRequestException
TelegramApiRequestException
default void onClosing()
Copyright © 2018. All rights reserved.