Table of Contents

Class RestWebhook

Namespace
Discord.Rest
Assembly
Discord.Net.Rest.dll
public class RestWebhook : RestEntity<ulong>, IWebhook, IDeletable, ISnowflakeEntity, IEntity<ulong>, IUpdateable
Inheritance
RestWebhook
Implements
Inherited Members

Properties

ApplicationId

Gets the ID of the application owning this webhook.

public ulong? ApplicationId { get; }

Property Value

ulong?

AvatarId

Gets the ID of this webhook's default avatar.

public string AvatarId { get; }

Property Value

string

ChannelId

Gets the ID of the channel for this webhook; null for Application webhooks.

public ulong? ChannelId { get; }

Property Value

ulong?

CreatedAt

Gets when the snowflake was created.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

A DateTimeOffset representing when the entity was first created.

Creator

Gets the user that created this webhook.

public IUser Creator { get; }

Property Value

IUser

FollowedChannelId

Gets the id of the followed channel. null if Type is not ChannelFollower.

public ulong? FollowedChannelId { get; }

Property Value

ulong?

FollowedChannelName

Gets the name of the followed channel. null if Type is not ChannelFollower.

public string FollowedChannelName { get; }

Property Value

string

GuildId

Gets the ID of the guild owning this webhook.

public ulong? GuildId { get; }

Property Value

ulong?

Name

Gets the default name of this webhook.

public string Name { get; }

Property Value

string

PartialGuild

Gets the partial guild of the followed channel. null if Type is not ChannelFollower.

public PartialGuild PartialGuild { get; }

Property Value

PartialGuild

Token

Gets the token of this webhook; null if the Type is ChannelFollower.

public string Token { get; }

Property Value

string

Type

Gets the type of this webhook.

public WebhookType Type { get; }

Property Value

WebhookType

Methods

DeleteAsync(RequestOptions)

Deletes this object and all its children.

public Task DeleteAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

GetAvatarUrl(ImageFormat, ushort)

Gets the URL to this webhook's default avatar.

public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)

Parameters

format ImageFormat
size ushort

Returns

string

ModifyAsync(Action<WebhookProperties>, RequestOptions)

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

Parameters

func Action<WebhookProperties>
options RequestOptions

Returns

Task

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

UpdateAsync(RequestOptions)

Updates this object's properties with its current state.

public Task UpdateAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task