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

public class User extends Object
This object represents a Telegram user or bot. User
Since:
1.0.0
Author:
Sergio del Amo
  • Constructor Details

    • User

      public User()
  • Method Details

    • getId

      @NonNull public @NonNull Long getId()
      Returns:
      Unique identifier for this user or bot.
    • setId

      public void setId(@NonNull @NonNull Long id)
      Parameters:
      id - Unique identifier for this user or bot.
    • getBot

      @NonNull public @NonNull Boolean getBot()
      Returns:
      True, if this user is a bot.
    • setBot

      public void setBot(@NonNull @NonNull Boolean bot)
      Parameters:
      bot - True, if this user is a bot.
    • getFirstName

      @NonNull public @NonNull String getFirstName()
      Returns:
      User‘s or bot’s first name.
    • setFirstName

      public void setFirstName(@NonNull @NonNull String firstName)
      Parameters:
      firstName - User‘s or bot’s first name.
    • getLastName

      @Nullable public @Nullable String getLastName()
      Returns:
      User‘s or bot’s last name.
    • setLastName

      public void setLastName(@Nullable @Nullable String lastName)
      Parameters:
      lastName - User‘s or bot’s last name.
    • getUsername

      @Nullable public @Nullable String getUsername()
      Returns:
      User‘s or bot’s username.
    • setUsername

      public void setUsername(@Nullable @Nullable String username)
      Parameters:
      username - User‘s or bot’s username.
    • getLanguageCode

      @Nullable public @Nullable String getLanguageCode()
      Returns:
      IETF language tag of the user's language.
    • setLanguageCode

      public void setLanguageCode(@Nullable @Nullable String languageCode)
      Parameters:
      languageCode - IETF language tag of the user's language.
    • getCanJoinGroups

      @Nullable public @Nullable Boolean getCanJoinGroups()
      Returns:
      True, if the bot can be invited to groups. Returned only in getMe.
    • setCanJoinGroups

      public void setCanJoinGroups(@Nullable @Nullable Boolean canJoinGroups)
      Parameters:
      canJoinGroups - True, if the bot can be invited to groups. Returned only in getMe.
    • getCanReadAllGroupMessages

      @Nullable public @Nullable Boolean getCanReadAllGroupMessages()
      Returns:
      True, if privacy mode is disabled for the bot. Returned only in getMe.
    • setCanReadAllGroupMessages

      public void setCanReadAllGroupMessages(@Nullable @Nullable Boolean canReadAllGroupMessages)
      Parameters:
      canReadAllGroupMessages - True, if privacy mode is disabled for the bot. Returned only in getMe.
    • getSupportsInlineQueries

      @Nullable public @Nullable Boolean getSupportsInlineQueries()
      Returns:
      True, if the bot supports inline queries. Returned only in getMe.
    • setSupportsInlineQueries

      public void setSupportsInlineQueries(@Nullable @Nullable Boolean supportsInlineQueries)
      Parameters:
      supportsInlineQueries - True, if the bot supports inline queries. Returned only in getMe.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPremium

      @Nullable public @Nullable Boolean isPremium()
      Returns:
      True, if this user is a Telegram Premium user
    • setPremium

      public void setPremium(@Nullable @Nullable Boolean premium)
      Parameters:
      premium - True, if this user is a Telegram Premium user
    • getAddedToAttachmentMenu

      @Nullable public @Nullable Boolean getAddedToAttachmentMenu()
      Returns:
      True, if this user added the bot to the attachment menu
    • setAddedToAttachmentMenu

      public void setAddedToAttachmentMenu(@Nullable @Nullable Boolean addedToAttachmentMenu)
      Parameters:
      addedToAttachmentMenu - True, if this user added the bot to the attachment menu