ChatPermissions class abstract

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

Annotations
  • @freezed

Constructors

ChatPermissions.new({@JsonKey(name: 'can_send_messages') bool? canSendMessages, @JsonKey(name: 'can_send_polls') bool? canSendPolls, @JsonKey(name: 'can_send_other_messages') bool? canSendOtherMessages, @JsonKey(name: 'can_add_web_page_previews') bool? canAddWebPagePreviews, @JsonKey(name: 'can_change_info') bool? canChangeInfo, @JsonKey(name: 'can_invite_users') bool? canInviteUsers, @JsonKey(name: 'can_pin_messages') bool? canPinMessages, @JsonKey(name: 'can_manage_topics') bool? canManageTopics, @JsonKey(name: 'can_send_audios') bool? canSendAudios, @JsonKey(name: 'can_send_documents') bool? canSendDocuments, @JsonKey(name: 'can_send_photos') bool? canSendPhotos, @JsonKey(name: 'can_send_videos') bool? canSendVideos, @JsonKey(name: 'can_send_video_notes') bool? canSendVideoNotes, @JsonKey(name: 'can_send_voice_notes') bool? canSendVoiceNotes})
Creates a new ChatPermissions object.
const
factory
ChatPermissions.fromJson(Map<String, dynamic> json)
Creates a new ChatPermissions object from json String.
factory

Properties

canAddWebPagePreviews bool?
Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
no setterinherited
canChangeInfo bool?
Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
no setterinherited
canInviteUsers bool?
Optional. True, if the user is allowed to invite new users to the chat
no setterinherited
canManageTopics bool?
Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
no setterinherited
canPinMessages bool?
Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
no setterinherited
canSendAudios bool?
True, if the user is allowed to send audios Since Bot API 6.5
no setterinherited
canSendDocuments bool?
True, if the user is allowed to send documents
no setterinherited
canSendMessages bool?
Optional. True, if the user is allowed to send text messages, contacts, locations and venues
no setterinherited
canSendOtherMessages bool?
Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
no setterinherited
canSendPhotos bool?
True, if the user is allowed to send photos
no setterinherited
canSendPolls bool?
Optional. True, if the user is allowed to send polls, implies can_send_messages
no setterinherited
canSendVideoNotes bool?
True, if the user is allowed to send video notes
no setterinherited
canSendVideos bool?
True, if the user is allowed to send videos
no setterinherited
canSendVoiceNotes bool?
True, if the user is allowed to send voice notes
no setterinherited
copyWith → $ChatPermissionsCopyWith<ChatPermissions>
Create a copy of ChatPermissions with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ChatPermissions to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited