Class ChatMember

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

public class ChatMember extends Object
This object contains information about one member of a chat.
See Also:
  • Constructor Details

    • ChatMember

      public ChatMember()
  • Method Details

    • getUser

      @NonNull public @NonNull User getUser()
      Returns:
      Information about the user.
    • setUser

      public void setUser(@NonNull @NonNull User user)
      Parameters:
      user - Information about the user.
    • getStatus

      public String getStatus()
      Returns:
      The member's status in the chat.
    • setStatus

      public void setStatus(String status)
      Parameters:
      status - The member's status in the chat.
    • getCustomTitle

      @Nullable public @Nullable String getCustomTitle()
      Returns:
      Custom title for this user.
    • setCustomTitle

      public void setCustomTitle(@Nullable @Nullable String customTitle)
      Parameters:
      customTitle - Custom title for this user.
    • getUntilDate

      @Nullable public @Nullable Integer getUntilDate()
      Returns:
      Date when restrictions will be lifted for this user
    • setUntilDate

      public void setUntilDate(@Nullable @Nullable Integer untilDate)
      Parameters:
      untilDate - Date when restrictions will be lifted for this user
    • getCanBeEdited

      @Nullable public @Nullable Boolean getCanBeEdited()
      Returns:
      True, if the bot is allowed to edit administrator privileges of that user.
    • setCanBeEdited

      public void setCanBeEdited(@Nullable @Nullable Boolean canBeEdited)
      Parameters:
      canBeEdited - True, if the bot is allowed to edit administrator privileges of that user.
    • getCanPostMessages

      @Nullable public @Nullable Boolean getCanPostMessages()
      Returns:
      True, if the administrator can post in the channel; channels only.
    • setCanPostMessages

      public void setCanPostMessages(@Nullable @Nullable Boolean canPostMessages)
      Parameters:
      canPostMessages - True, if the administrator can post in the channel; channels only.
    • getCanEditMessages

      @Nullable public @Nullable Boolean getCanEditMessages()
      Returns:
      True, if the administrator can edit messages of other users and can pin messages; channels only.
    • setCanEditMessages

      public void setCanEditMessages(@Nullable @Nullable Boolean canEditMessages)
      Parameters:
      canEditMessages - True, if the administrator can edit messages of other users and can pin messages; channels only.
    • getCanDeleteMessages

      @Nullable public @Nullable Boolean getCanDeleteMessages()
      Returns:
      True, if the administrator can delete messages of other users.
    • setCanDeleteMessages

      public void setCanDeleteMessages(@Nullable @Nullable Boolean canDeleteMessages)
      Parameters:
      canDeleteMessages - True, if the administrator can delete messages of other users.
    • getCanRestrictMembers

      @Nullable public @Nullable Boolean getCanRestrictMembers()
      Returns:
      True, if the administrator can restrict, ban or unban chat members.
    • setCanRestrictMembers

      public void setCanRestrictMembers(@Nullable @Nullable Boolean canRestrictMembers)
      Parameters:
      canRestrictMembers - True, if the administrator can restrict, ban or unban chat members.
    • getCanPromoteMembers

      @Nullable public @Nullable Boolean getCanPromoteMembers()
      Returns:
      True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly
    • setCanPromoteMembers

      public void setCanPromoteMembers(@Nullable @Nullable Boolean canPromoteMembers)
      Parameters:
      canPromoteMembers - True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly
    • getCanChangeInfo

      @Nullable public @Nullable Boolean getCanChangeInfo()
      Returns:
      True, if the user is allowed to change the chat title, photo and other settings.
    • setCanChangeInfo

      public void setCanChangeInfo(@Nullable @Nullable Boolean canChangeInfo)
      Parameters:
      canChangeInfo - True, if the user is allowed to change the chat title, photo and other settings.
    • getCanInviteUsers

      @Nullable public @Nullable Boolean getCanInviteUsers()
      Returns:
      True, if the user is allowed to invite new users to the chat.
    • setCanInviteUsers

      public void setCanInviteUsers(@Nullable @Nullable Boolean canInviteUsers)
      Parameters:
      canInviteUsers - True, if the user is allowed to invite new users to the chat.
    • getCanPinMessages

      @Nullable public @Nullable Boolean getCanPinMessages()
      Returns:
      True, if the user is allowed to pin messages; groups and supergroups only.
    • setCanPinMessages

      public void setCanPinMessages(@Nullable @Nullable Boolean canPinMessages)
      Parameters:
      canPinMessages - True, if the user is allowed to pin messages; groups and supergroups only.
    • isMember

      @Nullable public @Nullable Boolean isMember()
      Returns:
      True, if the user is a member of the chat at the moment of the request.
    • setMember

      public void setMember(@Nullable @Nullable Boolean member)
      Parameters:
      member - True, if the user is a member of the chat at the moment of the request.
    • getCanSendMessages

      @Nullable public @Nullable Boolean getCanSendMessages()
      Returns:
      True, if the user is allowed to send text messages, contacts, locations and venues.
    • setCanSendMessages

      public void setCanSendMessages(@Nullable @Nullable Boolean canSendMessages)
      Parameters:
      canSendMessages - True, if the user is allowed to send text messages, contacts, locations and venues.
    • getCanSendMediaMessages

      @Nullable public @Nullable Boolean getCanSendMediaMessages()
      Returns:
      True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes.
    • setCanSendMediaMessages

      public void setCanSendMediaMessages(@Nullable @Nullable Boolean canSendMediaMessages)
      Parameters:
      canSendMediaMessages - True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes.
    • getCanSendPolls

      @Nullable public @Nullable Boolean getCanSendPolls()
      Returns:
      True, if the user is allowed to send polls.
    • setCanSendPolls

      public void setCanSendPolls(@Nullable @Nullable Boolean canSendPolls)
      Parameters:
      canSendPolls - True, if the user is allowed to send polls.
    • getCanSendOtherMessages

      @Nullable public @Nullable Boolean getCanSendOtherMessages()
      Returns:
      True, if the user is allowed to send animations, games, stickers and use inline bots.
    • setCanSendOtherMessages

      public void setCanSendOtherMessages(@Nullable @Nullable Boolean canSendOtherMessages)
      Parameters:
      canSendOtherMessages - True, if the user is allowed to send animations, games, stickers and use inline bots.
    • getCanAddWebPagePreviews

      @Nullable public @Nullable Boolean getCanAddWebPagePreviews()
      Returns:
      True, if the user is allowed to add web page previews to their messages.
    • setCanAddWebPagePreviews

      public void setCanAddWebPagePreviews(@Nullable @Nullable Boolean canAddWebPagePreviews)
      Parameters:
      canAddWebPagePreviews - True, if the user is allowed to add web page previews to their messages.
    • toString

      public String toString()
      Overrides:
      toString in class Object