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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public void setSupportsInlineQueries(@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

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

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

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

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