Class RestContentFilter
表示一个基于 REST 的内容过滤器实体。
public class RestContentFilter : RestEntity<string>, IContentFilter, IEntity<string>, IDeletable
- Inheritance
-
RestContentFilter
- Implements
- Inherited Members
Properties
CreatedAt
获取内容过滤器创建的时间。
public DateTimeOffset CreatedAt { get; }
Property Value
Exemptions
获取此内容过滤器的豁免列表。
public IReadOnlyCollection<ContentFilterExemption> Exemptions { get; }
Property Value
GuildId
获取此内容过滤器所属的服务器的 ID。
public ulong GuildId { get; }
Property Value
Handlers
获取此内容过滤器的处理程序。
public IReadOnlyCollection<IContentFilterHandler> Handlers { get; }
Property Value
IsEnabled
获取此内容过滤器是否启用。
public bool IsEnabled { get; }
Property Value
Name
获取此限制的名称。
public string Name { get; }
Property Value
Target
获取此内容过滤器的目标。
public IContentFilterTarget Target { get; }
Property Value
UpdatedAt
获取内容过滤器更新的时间。
public DateTimeOffset UpdatedAt { get; }
Property Value
Methods
DeleteAsync(RequestOptions?)
删除此实体对象及其所有子实体对象。
public Task DeleteAsync(RequestOptions? options = null)
Parameters
optionsRequestOptions发送请求时要使用的选项。
Returns
DisableAsync(RequestOptions?)
禁用此内容过滤器。
public Task DisableAsync(RequestOptions? options = null)
Parameters
optionsRequestOptions发送请求时要使用的选项。
Returns
- Task
一个表示异步修改操作的任务。
EnableAsync(RequestOptions?)
启用此内容过滤器。
public Task EnableAsync(RequestOptions? options = null)
Parameters
optionsRequestOptions发送请求时要使用的选项。
Returns
- Task
一个表示异步修改操作的任务。
ModifyAsync(Action<ModifyContentFilterProperties>, RequestOptions?)
修改服务器的内容过滤器信息。
public Task ModifyAsync(Action<ModifyContentFilterProperties> func, RequestOptions? options = null)
Parameters
funcAction<ModifyContentFilterProperties>用于修改内容过滤器属性的委托。
optionsRequestOptions发送请求时要使用的选项。
Returns
- Task
一个表示异步修改操作的任务。