Constructs a new instance of ChatPermissions with optional initial data.
Optional
data: ChatPermissionFlagsAn object containing the initial permissions.
Grants the specified permissions.
The permissions to grant.
The updated ChatPermissions instance.
Denies the specified permissions.
The permissions to deny.
The updated ChatPermissions instance.
Checks if this instance is equal to another ChatPermissions instance.
The other instance to compare.
true
if both instances are equal, otherwise false
.
Checks if the specified permission is granted.
The permission to check.
true
if the permission is granted, otherwise false
.
Converts the permissions to a plain object representation.
An object with permissions and their status.
Static
is
Represents a set of chat permissions and provides methods to manage them.