Skip to main content

MemberRole

A struct describing roles of a member in a channel. There are some predefined types but any type can be introduced and sent by the backend.

public struct MemberRole: RawRepresentable, Codable, Hashable, ExpressibleByStringLiteral 

Inheritance

Codable, ExpressibleByStringLiteral, Hashable, RawRepresentable

Initializers

init(rawValue:)

public init(rawValue: String) 

init(stringLiteral:)

public init(stringLiteral value: String) 

init(from:)

init(from decoder: Decoder) throws 

Properties

rawValue

public let rawValue: String

member

This is the default role assigned to any member.

static let member 

moderator

Allows the member to perform moderation, for example ban users, add/remove users, etc.

static let moderator 

admin

This role allows the member to perform more advanced actions. This role should be granted only to staff users.

static let admin 

owner

This role allows the member to perform destructive actions on the channel.

static let owner 

Did you find this page helpful?