Interface TelegramBot


public interface TelegramBot
Represents the Telegram bot handled by the TelegramIntegrationManager.
See Also:
  • Method Details

    • load

      void load() throws Exception
      Loads the Telegram bot.
      Throws:
      Exception - If something goes wrong
    • unload

      void unload()
      Unloads the Telegram bot.
    • getInstance

      static TelegramBot getInstance()
      Gets the bot's instance.

      This method calls TelegramIntegrationManager.getBot().

      Returns:
      Bot's instance
    • sendMessage

      void sendMessage(long chatID, String message)
      Sends a message to the specified chat.
      Parameters:
      chatID - Chat's ID
      message - Message to send
      See Also:
    • sendMessage

      default void sendMessage(String message)
      Parameters:
      message - Message to send
      See Also:
    • getUsers

      int getUsers()
      Gets the amount of users in the Telegram group.
      Returns:
      Users' amount
    • getChatTitle

      String getChatTitle(long chatID)
      Gets the title of the specified chat.

      Will return Utils.NOT_APPLICABLE if it is invalid.

      Parameters:
      chatID - Chat's ID
      Returns:
      Chat's title
    • setStatus

      void setStatus(String value)
      Updates the bot's current status.
      Parameters:
      value - Text to display
      See Also: