Table of Contents

Class RestContentFilter

Namespace
Kook.Rest
Assembly
Kook.Net.Experimental.dll

表示一个基于 REST 的内容过滤器实体。

public class RestContentFilter : RestEntity<string>, IContentFilter, IEntity<string>, IDeletable
Inheritance
RestContentFilter
Implements
Inherited Members

Properties

CreatedAt

获取内容过滤器创建的时间。

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Exemptions

获取此内容过滤器的豁免列表。

public IReadOnlyCollection<ContentFilterExemption> Exemptions { get; }

Property Value

IReadOnlyCollection<ContentFilterExemption>

GuildId

获取此内容过滤器所属的服务器的 ID。

public ulong GuildId { get; }

Property Value

ulong

Handlers

获取此内容过滤器的处理程序。

public IReadOnlyCollection<IContentFilterHandler> Handlers { get; }

Property Value

IReadOnlyCollection<IContentFilterHandler>

IsEnabled

获取此内容过滤器是否启用。

public bool IsEnabled { get; }

Property Value

bool

Name

获取此限制的名称。

public string Name { get; }

Property Value

string

Target

获取此内容过滤器的目标。

public IContentFilterTarget Target { get; }

Property Value

IContentFilterTarget

UpdatedAt

获取内容过滤器更新的时间。

public DateTimeOffset UpdatedAt { get; }

Property Value

DateTimeOffset

Methods

DeleteAsync(RequestOptions?)

删除此实体对象及其所有子实体对象。

public Task DeleteAsync(RequestOptions? options = null)

Parameters

options RequestOptions

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

Returns

Task

DisableAsync(RequestOptions?)

禁用此内容过滤器。

public Task DisableAsync(RequestOptions? options = null)

Parameters

options RequestOptions

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

Returns

Task

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

EnableAsync(RequestOptions?)

启用此内容过滤器。

public Task EnableAsync(RequestOptions? options = null)

Parameters

options RequestOptions

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

Returns

Task

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

ModifyAsync(Action<ModifyContentFilterProperties>, RequestOptions?)

修改服务器的内容过滤器信息。

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

Parameters

func Action<ModifyContentFilterProperties>

用于修改内容过滤器属性的委托。

options RequestOptions

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

Returns

Task

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