Class RestWebhook
Assembly: Discord.Net.Rest.dll​
View Source​
Declaration
public class RestWebhook : RestEntity<ulong>, IWebhook, IDeletable, ISnowflakeEntity, IEntity<ulong>, IUpdateable
Properties​
Token​
Gets the token of this webhook.
View Source​
Declaration
public string Token { get; }
ChannelId​
Gets the ID of the channel for this webhook.
View Source​
Declaration
public ulong ChannelId { get; }
Name​
Gets the default name of this webhook.
View Source​
Declaration
public string Name { get; }
AvatarId​
Gets the ID of this webhook's default avatar.
View Source​
Declaration
public string AvatarId { get; }
GuildId​
Gets the ID of the guild owning this webhook.
View Source​
Declaration
public ulong? GuildId { get; }
Creator​
Gets the user that created this webhook.
View Source​
Declaration
public IUser Creator { get; }
ApplicationId​
Gets the ID of the application owning this webhook.
View Source​
Declaration
public ulong? ApplicationId { get; }
CreatedAt​
Gets when the snowflake was created.
View Source​
Declaration
public DateTimeOffset CreatedAt { get; }
IWebhook.Guild​
Gets the guild owning this webhook.
View Source​
Declaration
IGuild IWebhook.Guild { get; }
IWebhook.Channel​
Gets the channel for this webhook.
View Source​
Declaration
ITextChannel IWebhook.Channel { get; }
Methods​
UpdateAsync(RequestOptions)​
Updates this object's properties with its current state.
View Source​
Declaration
public async Task UpdateAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetAvatarUrl(ImageFormat, UInt16)​
Gets the URL to this webhook's default avatar.
View Source​
Declaration
public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
Returns​
System.String
Parameters​
Type | Name |
---|---|
Discord.ImageFormat | format |
System.UInt16 | size |
ModifyAsync(Action<WebhookProperties>, RequestOptions)​
View Source​
Declaration
public async Task ModifyAsync(Action<WebhookProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name |
---|---|
System.Action<Discord.WebhookProperties> | func |
Discord.RequestOptions | options |
DeleteAsync(RequestOptions)​
Deletes this object and all its children.
View Source​
Declaration
public Task DeleteAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
ToString()​
View Source​
Declaration
public override string ToString()
Returns​
System.String
IWebhook.ModifyAsync(Action<WebhookProperties>, RequestOptions)​
Modifies this webhook.
View Source​
Declaration
Task IWebhook.ModifyAsync(Action<WebhookProperties> func, RequestOptions options)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name |
---|---|
System.Action<Discord.WebhookProperties> | func |
Discord.RequestOptions | options |