Interface BotSettings

All Known Implementing Classes:
LongPollingBotSettings, WebhookBotSettings

public interface BotSettings
Interface defining common settings for configuring a Telegram bot.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default Bot API endpoint URL used to connect with the Telegram Bot API.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the endpoint URL for connecting to the Telegram Bot API.
    boolean
    Determines whether bot extensions are enabled.
    boolean
    Specifies whether exceptions that occur during bot method execution should be thrown silently.
  • Field Details

    • DEFAULT_BOT_API_URL

      static final String DEFAULT_BOT_API_URL
      The default Bot API endpoint URL used to connect with the Telegram Bot API.
      See Also:
  • Method Details

    • endpointUrl

      default String 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:
      true if exceptions are thrown silently, otherwise false
    • extensionsEnabled

      boolean extensionsEnabled()
      Determines whether bot extensions are enabled.
      Returns:
      true if extensions are enabled, otherwise false