Table of Contents

Struct RoomPermissions

Namespace
HeyBox
Assembly
HeyBox.Net.Core.dll

表示一个房间的权限集。

public struct RoomPermissions
Inherited Members

Constructors

RoomPermissions(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)

使用指定的权限位信息创建一个 RoomPermissions 结构的新实例。

public RoomPermissions(bool administrator = false, bool viewChannel = false, bool manageChannels = false, bool viewAuditLogs = false, bool manageRoles = false, bool manageRoom = false, bool createInvites = false, bool manageInvites = false, bool changeNickname = false, bool manageNicknames = false, bool kickMembers = false, bool kickFromChannel = false, bool banMembers = false, bool silenceMembers = false, bool sendMessages = false, bool attachFiles = false, bool mentionEveryone = false, bool addReactions = false, bool manageMessages = false, bool receiveOfflineMessages = false, bool createTeamUpInvitations = false, bool manageTeamUpInvitations = false, bool connect = false, bool speak = false, bool useVoiceActivity = false, bool muteChannels = false, bool muteMembers = false, bool moveMembers = false, bool manageStatements = false, bool modifyChannelInvites = false, bool manageEmojisAndStickers = false, bool manageSoundPacks = false, bool playSoundPacks = false, bool shareAudio = false, bool shareScreen = false, bool postTeamUps = false, bool useBotCommands = false)

Parameters

administrator bool

管理员。

viewChannel bool

查看频道。

manageChannels bool

管理频道。

viewAuditLogs bool

查看审核日志。

manageRoles bool

管理角色权限。

manageRoom bool

管理房间。

createInvites bool

创建邀请。

manageInvites bool

管理邀请。

changeNickname bool

修改昵称。

manageNicknames bool

管理昵称。

kickMembers bool

将某人踢出房间。

kickFromChannel bool

将某人踢出频道。

banMembers bool

将某人加入房间黑名单。

silenceMembers bool

禁言某人。

sendMessages bool

发送消息。

attachFiles bool

上传文件。

mentionEveryone bool

@全体、@在线和所有权限组。

addReactions bool

添加表情回应。

manageMessages bool

管理消息。

receiveOfflineMessages bool

接收离线消息。

createTeamUpInvitations bool

创建开黑邀约。

manageTeamUpInvitations bool

管理开黑邀约。

connect bool

加入语音频道。

speak bool

语音频道内说话。

useVoiceActivity bool

允许直接讲话。

muteChannels bool

频道静音。

muteMembers bool

静音成员。

moveMembers bool

移动成员。

manageStatements bool

管理语句。

modifyChannelInvites bool

修改频道内其他人的邀约。

manageEmojisAndStickers bool

管理表情。

manageSoundPacks bool

管理语音包。

playSoundPacks bool

播放语音包。

shareAudio bool

播放伴奏。

shareScreen bool

共享屏幕。

postTeamUps bool

发布组队。

useBotCommands bool

使用机器人命令。

RoomPermissions(ulong)

使用指定的权限原始值创建一个 RoomPermissions 结构的新实例。

public RoomPermissions(ulong rawValue)

Parameters

rawValue ulong

权限原始值。

Fields

All

获取一个包含所有可以为房间设置的权限的 RoomPermissions

public static readonly RoomPermissions All

Field Value

RoomPermissions

None

获取一个空的 RoomPermissions,不包含任何权限。

public static readonly RoomPermissions None

Field Value

RoomPermissions

Properties

AddReactions

获取此权限集的相关用户是否可以添加表情回应。

public bool AddReactions { get; }

Property Value

bool

Administrator

获取此权限集的相关用户是否是管理员。

public bool Administrator { get; }

Property Value

bool

AttachFiles

获取此权限集的相关用户是否可以上传文件。

public bool AttachFiles { get; }

Property Value

bool

BanMembers

获取此权限集的相关用户是否可以将某人加入房间黑名单。

public bool BanMembers { get; }

Property Value

bool

ChangeNickname

获取此权限集的相关用户是否可以修改昵称。

public bool ChangeNickname { get; }

Property Value

bool

Connect

获取此权限集的相关用户是否可以加入语音频道。

public bool Connect { get; }

Property Value

bool

CreateInvites

获取此权限集的相关用户是否可以创建邀请。

public bool CreateInvites { get; }

Property Value

bool

CreateTeamUpInvitations

获取此权限集的相关用户是否可以创建开黑邀约。

public bool CreateTeamUpInvitations { get; }

Property Value

bool

KickFromChannel

获取此权限集的相关用户是否可以将某人踢出频道。

public bool KickFromChannel { get; }

Property Value

bool

KickMembers

获取此权限集的相关用户是否可以将某人踢出房间。

public bool KickMembers { get; }

Property Value

bool

ManageChannels

获取此权限集的相关用户是否可以管理频道。

public bool ManageChannels { get; }

Property Value

bool

ManageEmojisAndStickers

获取此权限集的相关用户是否可以管理表情。

public bool ManageEmojisAndStickers { get; }

Property Value

bool

ManageInvites

获取此权限集的相关用户是否可以管理邀请。

public bool ManageInvites { get; }

Property Value

bool

ManageMessages

获取此权限集的相关用户是否可以管理消息。

public bool ManageMessages { get; }

Property Value

bool

ManageNicknames

获取此权限集的相关用户是否可以管理昵称。

public bool ManageNicknames { get; }

Property Value

bool

ManageRoles

获取此权限集的相关用户是否可以管理角色权限。

public bool ManageRoles { get; }

Property Value

bool

ManageRoom

获取此权限集的相关用户是否可以管理房间。

public bool ManageRoom { get; }

Property Value

bool

ManageSoundPacks

获取此权限集的相关用户是否可以管理语音包。

public bool ManageSoundPacks { get; }

Property Value

bool

ManageStatements

获取此权限集的相关用户是否可以管理语句。

public bool ManageStatements { get; }

Property Value

bool

ManageTeamUpInvitations

获取此权限集的相关用户是否可以管理开黑邀约。

public bool ManageTeamUpInvitations { get; }

Property Value

bool

MentionEveryone

获取此权限集的相关用户是否可以 @全体、@在线和所有权限组。

public bool MentionEveryone { get; }

Property Value

bool

ModifyChannelInvites

获取此权限集的相关用户是否可以修改频道内其他人的邀约。

public bool ModifyChannelInvites { get; }

Property Value

bool

MoveMembers

获取此权限集的相关用户是否可以移动成员。

public bool MoveMembers { get; }

Property Value

bool

MuteChannels

获取此权限集的相关用户是否可以频道静音。

public bool MuteChannels { get; }

Property Value

bool

MuteMembers

获取此权限集的相关用户是否可以静音成员。

public bool MuteMembers { get; }

Property Value

bool

PlaySoundPacks

获取此权限集的相关用户是否可以播放语音包。

public bool PlaySoundPacks { get; }

Property Value

bool

PostTeamUps

获取此权限集的相关用户是否可以发布组队。

public bool PostTeamUps { get; }

Property Value

bool

RawValue

获取此权限集的原始值。

public readonly ulong RawValue { get; }

Property Value

ulong

ReceiveOfflineMessages

获取此权限集的相关用户是否可以接收离线消息。

public bool ReceiveOfflineMessages { get; }

Property Value

bool

SendMessages

获取此权限集的相关用户是否可以发送消息。

public bool SendMessages { get; }

Property Value

bool

ShareAudio

获取此权限集的相关用户是否可以播放伴奏。

public bool ShareAudio { get; }

Property Value

bool

ShareScreen

获取此权限集的相关用户是否可以共享屏幕。

public bool ShareScreen { get; }

Property Value

bool

SilenceMembers

获取此权限集的相关用户是否可以禁言某人。

public bool SilenceMembers { get; }

Property Value

bool

Speak

获取此权限集的相关用户是否可以语音频道内说话。

public bool Speak { get; }

Property Value

bool

UseBotCommands

获取此权限集的相关用户是否可以使用机器人命令。

public bool UseBotCommands { get; }

Property Value

bool

UseVoiceActivity

获取此权限集的相关用户是否可以允许直接讲话。

public bool UseVoiceActivity { get; }

Property Value

bool

ViewAuditLogs

获取此权限集的相关用户是否可以查看审核日志。

public bool ViewAuditLogs { get; }

Property Value

bool

ViewChannel

获取此权限集的相关用户是否可以查看频道。

public bool ViewChannel { get; }

Property Value

bool

Methods

Has(RoomPermission)

获取当前权限集是否包含指定的权限。

public bool Has(RoomPermission permission)

Parameters

permission RoomPermission

要检查的权限。

Returns

bool

如果当前权限集包含了所有指定的权限信息,则为 true;否则为 false

Modify(bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?, bool?)

以当前权限集为基础,更改指定的权限,返回一个 RoomPermissions 结构的新实例。

public RoomPermissions Modify(bool? administrator = null, bool? viewChannel = null, bool? manageChannels = null, bool? viewAuditLogs = null, bool? manageRoles = null, bool? manageRoom = null, bool? createInvites = null, bool? manageInvites = null, bool? changeNickname = null, bool? manageNicknames = null, bool? kickMembers = null, bool? kickFromChannel = null, bool? banMembers = null, bool? silenceMembers = null, bool? sendMessages = null, bool? attachFiles = null, bool? mentionEveryone = null, bool? addReactions = null, bool? manageMessages = null, bool? receiveOfflineMessages = null, bool? createTeamUpInvitations = null, bool? manageTeamUpInvitations = null, bool? connect = null, bool? speak = null, bool? useVoiceActivity = null, bool? muteChannels = null, bool? muteMembers = null, bool? moveMembers = null, bool? manageStatements = null, bool? modifyChannelInvites = null, bool? manageEmojisAndStickers = null, bool? manageSoundPacks = null, bool? playSoundPacks = null, bool? shareAudio = null, bool? shareScreen = null, bool? postTeamUps = null, bool? useBotCommands = null)

Parameters

administrator bool?

管理员。

viewChannel bool?

查看频道。

manageChannels bool?

管理频道。

viewAuditLogs bool?

查看审核日志。

manageRoles bool?

管理角色权限。

manageRoom bool?

管理房间。

createInvites bool?

创建邀请。

manageInvites bool?

管理邀请。

changeNickname bool?

修改昵称。

manageNicknames bool?

管理昵称。

kickMembers bool?

将某人踢出房间。

kickFromChannel bool?

将某人踢出频道。

banMembers bool?

将某人加入房间黑名单。

silenceMembers bool?

禁言某人。

sendMessages bool?

发送消息。

attachFiles bool?

上传文件。

mentionEveryone bool?

@全体、@在线和所有权限组。

addReactions bool?

添加表情回应。

manageMessages bool?

管理消息。

receiveOfflineMessages bool?

接收离线消息。

createTeamUpInvitations bool?

创建开黑邀约。

manageTeamUpInvitations bool?

管理开黑邀约。

connect bool?

加入语音频道。

speak bool?

语音频道内说话。

useVoiceActivity bool?

允许直接讲话。

muteChannels bool?

频道静音。

muteMembers bool?

静音成员。

moveMembers bool?

移动成员。

manageStatements bool?

管理语句。

modifyChannelInvites bool?

修改频道内其他人的邀约。

manageEmojisAndStickers bool?

管理表情。

manageSoundPacks bool?

管理语音包。

playSoundPacks bool?

播放语音包。

shareAudio bool?

播放伴奏。

shareScreen bool?

共享屏幕。

postTeamUps bool?

发布组队。

useBotCommands bool?

使用机器人命令。

Returns

RoomPermissions

更改了指定权限的新的权限集。

ToList()

获取一个包含当前权限集所包含的所有已设置的 RoomPermission 独立位标志枚举值的集合。

public List<RoomPermission> ToList()

Returns

List<RoomPermission>

一个包含当前权限集所包含的所有已设置的 RoomPermission 独立位标志枚举值的集合;如果当前权限集未包含任何已设置的权限位,则会返回一个空集合。

ToString()

获取此权限集原始值的字符串表示。

public override string ToString()

Returns

string

此权限集原始值的字符串表示。