Table of Contents

Interface IRole

Namespace
HeyBox
Assembly
HeyBox.Net.Core.dll

表示一个通用的身份组。

public interface IRole : IEntity<ulong>, IMentionable, IDeletable
Inherited Members

Properties

Color

获取此角色的颜色。

Color Color { get; }

Property Value

Color

Remarks

如果此用户所拥有的最高角色的颜色类型为渐变色,则此属性返回的颜色是渐变色权益失效后的回退颜色。

ColorType

获取此角色的颜色类型。

ColorType ColorType { get; }

Property Value

ColorType

CreatedAt

获取此角色的创建时间。

DateTimeOffset? CreatedAt { get; }

Property Value

DateTimeOffset?

CreatorId

获取此角色的创建者 ID。

ulong CreatorId { get; }

Property Value

ulong

GradientColor

获取此角色的渐变色。

GradientColor? GradientColor { get; }

Property Value

GradientColor?

Remarks

如果此角色的颜色类型 ColorType 不为 Gradient,则此属性会返回 null

Icon

获取此角色的图标。

string Icon { get; }

Property Value

string

IsHoisted

获取拥有此角色的用户是否在用户列表中与普通在线成员分开显示。

bool IsHoisted { get; }

Property Value

bool

IsMentionable

获取是否允许任何人提及此角色。

bool IsMentionable { get; }

Property Value

bool

Name

获取此角色的名称。

string Name { get; }

Property Value

string

Permissions

获取此角色拥有的权限。

RoomPermissions Permissions { get; }

Property Value

RoomPermissions

Position

获取此角色在房间角色列表中的位置。

int Position { get; }

Property Value

int

Remarks

更小的数值表示更靠近列表顶部的位置。

Room

获取拥有此角色的房间。

IRoom Room { get; }

Property Value

IRoom

Type

获取此角色的类型。

RoleType Type { get; }

Property Value

RoleType

Methods

ModifyAsync(Action<RoleProperties>, RequestOptions?)

修改此角色。

Task ModifyAsync(Action<RoleProperties> func, RequestOptions? options = null)

Parameters

func Action<RoleProperties>

一个包含修改角色属性的委托。

options RequestOptions

发送请求时要使用的选项。

Returns

Task

一个表示异步修改操作的任务。

Remarks

此方法使用指定的属性修改当前角色信息。要查看可用的属性,请参考 RoleProperties