Class ChatPermissions


  • public class ChatPermissions
    extends java.lang.Object
    Describes actions that a non-administrator user is allowed to take in a chat.
    See Also:
    ChatPermissions
    • Constructor Detail

      • ChatPermissions

        public ChatPermissions()
    • Method Detail

      • getCanSendMessages

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Nullable
        public java.lang.Boolean getCanPinMessages()
        Returns:
        True, if the user is allowed to pin messages. Ignored in public supergroups
      • setCanPinMessages

        public void setCanPinMessages​(@Nullable
                                      java.lang.Boolean canPinMessages)
        Parameters:
        canPinMessages - True, if the user is allowed to pin messages. Ignored in public supergroups
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object