Table of Contents

Interface IBehaviorRestriction

Namespace
Kook
Assembly
Kook.Net.Experimental.dll

表示一个通用的服务器行为限制。

public interface IBehaviorRestriction : IEntity<string>, IDeletable
Inherited Members

Properties

Conditions

获取限制条件类型。

IReadOnlyCollection<IBehaviorRestrictionCondition> Conditions { get; }

Property Value

IReadOnlyCollection<IBehaviorRestrictionCondition>

CreatedAt

获取规则创建的时间。

DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Duration

获取限制持续时长。

TimeSpan Duration { get; }

Property Value

TimeSpan

GuildId

获取此行为限制所属的服务器的 ID。

ulong GuildId { get; }

Property Value

ulong

IsEnabled

获取此行为限制是否启用。

bool IsEnabled { get; }

Property Value

bool

Name

获取此限制的名称。

string Name { get; }

Property Value

string

Type

获取限制的行为类型。

BehaviorRestrictionType Type { get; }

Property Value

BehaviorRestrictionType

UpdatedAt

获取规则更新的时间。

DateTimeOffset UpdatedAt { get; }

Property Value

DateTimeOffset

Methods

DisableAsync(RequestOptions?)

禁用此行为限制。

Task DisableAsync(RequestOptions? options = null)

Parameters

options RequestOptions

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

Returns

Task

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

EnableAsync(RequestOptions?)

启用此行为限制。

Task EnableAsync(RequestOptions? options = null)

Parameters

options RequestOptions

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

Returns

Task

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

ModifyAsync(Action<ModifyBehaviorRestrictionProperties>, RequestOptions?)

修改服务器的行为限制信息。

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

Parameters

func Action<ModifyBehaviorRestrictionProperties>

用于修改行为限制属性的委托。

options RequestOptions

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

Returns

Task

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