java.lang.Object
io.micronaut.chatbots.telegram.api.Game

public class Game extends Object
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
See Also:
  • Constructor Details

    • Game

      public Game()
  • Method Details

    • getTitle

      @NonNull public @NonNull String getTitle()
      Returns:
      Title of the game.
    • setTitle

      public void setTitle(@NonNull @NonNull String title)
      Parameters:
      title - Title of the game.
    • getDescription

      @NonNull public @NonNull String getDescription()
      Returns:
      Description of the game.
    • setDescription

      public void setDescription(@NonNull @NonNull String description)
      Parameters:
      description - Description of the game.
    • getPhoto

      @NonNull public @NonNull List<PhotoSize> getPhoto()
      Returns:
      Photo that will be displayed in the game message in chats.
    • setPhoto

      public void setPhoto(@NonNull @NonNull List<PhotoSize> photo)
      Parameters:
      photo - Photo that will be displayed in the game message in chats.
    • getText

      @Nullable public @Nullable String getText()
      Returns:
      Brief description of the game or high scores included in the game message.
    • setText

      public void setText(@Nullable @Nullable String text)
      Parameters:
      text - Brief description of the game or high scores included in the game message.
    • getTextEntities

      @Nullable public @Nullable List<MessageEntity> getTextEntities()
      Returns:
      Special entities that appear in text, such as usernames, URLs, bot commands, etc.
    • setTextEntities

      public void setTextEntities(@Nullable @Nullable List<MessageEntity> textEntities)
      Parameters:
      textEntities - Special entities that appear in text, such as usernames, URLs, bot commands, etc.
    • getAnimation

      @Nullable public @Nullable Animation getAnimation()
      Returns:
      Animation that will be displayed in the game message in chats. Upload via BotFather.
    • setAnimation

      public void setAnimation(@Nullable @Nullable Animation animation)
      Parameters:
      animation - Animation that will be displayed in the game message in chats. Upload via BotFather.
    • toString

      public String toString()
      Overrides:
      toString in class Object