class ChatPermissions

Monday, August 24 2020 EAT

Describes actions that a non-administrator user is allowed to take in a chat.

Public Instance Methods

can_add_web_page_previews?() click to toggle source

Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages?

# File lib/objects/chat_permissions.rb, line 39
def can_add_web_page_previews?
  @perm.can_add_web_page_previews
end
can_change_info?() click to toggle source

Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups.

# File lib/objects/chat_permissions.rb, line 45
def can_change_info?
  @perm.can_change_info
end
can_invite_users?() click to toggle source

Optional. True, if the user is allowed to invite new users to the chat.

# File lib/objects/chat_permissions.rb, line 50
def can_invite_users?
  @perm.can_invite_users
end
can_pin_messages?() click to toggle source

Optional. True, if the user is allowed to pin messages. Ignored in public supergroups.

# File lib/objects/chat_permissions.rb, line 56
def can_pin_messages?
  @perm.can_pin_messages
end
can_send_media_messages?() click to toggle source

Optional. True, if the user is allowed to send audios, documents, photos, videos, video_notes and voice_notes, implies can_send_messages.

# File lib/objects/chat_permissions.rb, line 21
def can_send_media_messages?
  @perm.can_send_media_messages
end
can_send_messages?() click to toggle source

Optional. True, if the user is allowed to send text messages, contacts, locations and venues.

# File lib/objects/chat_permissions.rb, line 14
def can_send_messages?
  @perm.can_send_messages
end
can_send_other_messages?() click to toggle source

Optional. True, if the user is allowed to send animations, games stickers and use inline bots, implies can_send_media_messages

# File lib/objects/chat_permissions.rb, line 33
def can_send_other_messages?
  @perm.can_send_other_messages
end
can_send_polls?() click to toggle source

Optional. True, if the user is allowed to send_polls, implies can_send_messages?

# File lib/objects/chat_permissions.rb, line 27
def can_send_polls?
  @perm.can_send_polls
end