Class ChatAdministratorRights

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

public class ChatAdministratorRights extends Object
Represents the rights of an administrator in a chat. ChatAdministratorRights
Since:
1.0.0
Author:
Sergio del Amo
  • Constructor Details

    • ChatAdministratorRights

      public ChatAdministratorRights()
  • Method Details

    • isAnonymous

      @NonNull public @NonNull Boolean isAnonymous()
      Returns:
      True, if the user's presence in the chat is hidden
    • setAnonymous

      public void setAnonymous(@NonNull @NonNull Boolean anonymous)
      Parameters:
      anonymous - True, if the user's presence in the chat is hidden
    • getCanManageChat

      @NonNull public @NonNull Boolean getCanManageChat()
      Returns:
      True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
    • setCanManageChat

      public void setCanManageChat(@NonNull @NonNull Boolean canManageChat)
      Parameters:
      canManageChat - True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
    • getCanDeleteMessages

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

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

      @NonNull public @NonNull Boolean getCanManageVideoChats()
      Returns:
      True, if the administrator can manage video chats
    • setCanManageVideoChats

      public void setCanManageVideoChats(@NonNull @NonNull Boolean canManageVideoChats)
      Parameters:
      canManageVideoChats - True, if the administrator can manage video chats
    • getCanRestrictMembers

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

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

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

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

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

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

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

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

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

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

      @Nullable public @Nullable Boolean getCanEditMessages()
      Returns:
      Optional. 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
    • getCanPinMessages

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

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