Interface BotSettings
- All Known Implementing Classes:
LongPollingBotSettings,WebhookBotSettings
public interface BotSettings
Interface defining common settings for configuring a Telegram bot.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default Bot API endpoint URL used to connect with the Telegram Bot API. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the endpoint URL for connecting to the Telegram Bot API.booleanDetermines whether bot extensions are enabled.booleanSpecifies whether exceptions that occur during bot method execution should be thrown silently.
-
Field Details
-
DEFAULT_BOT_API_URL
The default Bot API endpoint URL used to connect with the Telegram Bot API.- See Also:
-
-
Method Details
-
endpointUrl
Returns the endpoint URL for connecting to the Telegram Bot API.By default, this method returns
DEFAULT_BOT_API_URL, but can be overridden to provide a custom API URL.- Returns:
- the Telegram Bot API endpoint URL
-
silentlyThrowMethodExecution
boolean silentlyThrowMethodExecution()Specifies whether exceptions that occur during bot method execution should be thrown silently.- Returns:
trueif exceptions are thrown silently, otherwisefalse
-
extensionsEnabled
boolean extensionsEnabled()Determines whether bot extensions are enabled.- Returns:
trueif extensions are enabled, otherwisefalse
-