ChatPermissions class

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

Constructors

ChatPermissions({bool? canSendMessages, bool? canSendPolls, bool? canSendOtherMessages, bool? canAddWebPagePreviews, bool? canChangeInfo, bool? canInviteUsers, bool? canPinMessages, bool? canManageTopics, bool? canSendAudios, bool? canSendDocuments, bool? canSendPhotos, bool? canSendVideos, bool? canSendVideoNotes, bool? canSendVoiceNotes})
Creates a new ChatPermissions object.
const
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
final
canChangeInfo bool?
Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
final
canInviteUsers bool?
Optional. True, if the user is allowed to invite new users to the chat
final
canManageTopics bool?
Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
final
canPinMessages bool?
Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
final
canSendAudios bool?
True, if the user is allowed to send audios Since Bot API 6.5
final
canSendDocuments bool?
True, if the user is allowed to send documents
final
canSendMessages bool?
Optional. True, if the user is allowed to send text messages, contacts, locations and venues
final
canSendOtherMessages bool?
Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
final
canSendPhotos bool?
True, if the user is allowed to send photos
final
canSendPolls bool?
Optional. True, if the user is allowed to send polls, implies can_send_messages
final
canSendVideoNotes bool?
True, if the user is allowed to send video notes
final
canSendVideos bool?
True, if the user is allowed to send videos
final
canSendVoiceNotes bool?
True, if the user is allowed to send voice notes
final
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>
Converts a ChatPermissions to a Map for JSON encoding.
toString() String
A string representation of this object.
inherited

Operators

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