Table of Contents

Class Webhook

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class Webhook : ClientEntity, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonWebhook>
Inheritance
Webhook
Implements
Derived
Inherited Members

Constructors

Webhook(JsonWebhook, RestClient)

public Webhook(JsonWebhook jsonModel, RestClient client)

Parameters

jsonModel JsonWebhook
client RestClient

Properties

ApplicationId

public ulong? ApplicationId { get; }

Property Value

ulong?

AvatarHash

public string? AvatarHash { get; }

Property Value

string

Channel

public Channel? Channel { get; }

Property Value

Channel

ChannelId

public ulong? ChannelId { get; }

Property Value

ulong?

Creator

public User? Creator { get; }

Property Value

User

Guild

public RestGuild? Guild { get; }

Property Value

RestGuild

GuildId

public ulong? GuildId { get; }

Property Value

ulong?

Id

The unique identifier for this object.

public override ulong Id { get; }

Property Value

ulong

Name

public string? Name { get; }

Property Value

string

Type

public WebhookType Type { get; }

Property Value

WebhookType

Url

public string? Url { get; }

Property Value

string

Methods

CreateFromJson(JsonWebhook, RestClient)

public static Webhook CreateFromJson(JsonWebhook jsonModel, RestClient client)

Parameters

jsonModel JsonWebhook
client RestClient

Returns

Webhook

DeleteAsync(RestRequestProperties?, CancellationToken)

public Task DeleteAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

GetAsync(RestRequestProperties?, CancellationToken)

public Task<Webhook> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

ModifyAsync(Action<WebhookOptions>, RestRequestProperties?, CancellationToken)

public Task<Webhook> ModifyAsync(Action<WebhookOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

action Action<WebhookOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>