Interface WebhookBot


  • public interface WebhookBot
    Version:
    1.0
    Author:
    Ruben Bermudez
    • Method Detail

      • onWebhookUpdateReceived

        BotApiMethod onWebhookUpdateReceived​(Update update)
        This method is called when receiving updates via webhook
        Parameters:
        update - Update received
      • getBotUsername

        String getBotUsername()
        Gets bot username of this bot
        Returns:
        Bot username
      • getBotToken

        String getBotToken()
        Gets bot token to access Telegram API
        Returns:
        Bot token
      • setWebhook

        void setWebhook​(String url,
                        String publicCertificatePath)
                 throws TelegramApiRequestException
        Execute setWebhook method to set up the url of the webhook
        Parameters:
        url - Url for the webhook
        publicCertificatePath - Path to the public key certificate of the webhook
        Throws:
        TelegramApiRequestException - In case of error executing the request
      • getBotPath

        String getBotPath()
        Gets in the url for the webhook
        Returns:
        path in the url