Class RestWebhook
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestWebhook : RestEntity<ulong>, IWebhook, IDeletable, ISnowflakeEntity, IEntity<ulong>, IUpdateable
Properties
| Improve this Doc View SourceAvatarId
Gets the ID of this webhook's default avatar.
Declaration
public string AvatarId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ChannelId
Gets the ID of the channel for this webhook.
Declaration
public ulong ChannelId { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt64 |
CreatedAt
Gets when the snowflake was created.
Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| System.DateTimeOffset | A System.DateTimeOffset representing when the entity was first created. |
Creator
Gets the user that created this webhook.
Declaration
public IUser Creator { get; }
Property Value
| Type | Description |
|---|---|
| IUser |
GuildId
Gets the ID of the guild owning this webhook.
Declaration
public ulong? GuildId { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt64> |
Name
Gets the default name of this webhook.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Token
Gets the token of this webhook.
Declaration
public string Token { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceDeleteAsync(RequestOptions)
Deletes this object and all its children.
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RequestOptions | options | The options to be used when sending the request. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
GetAvatarUrl(ImageFormat, UInt16)
Gets the URL to this webhook's default avatar.
Declaration
public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageFormat | format | |
| System.UInt16 | size |
Returns
| Type | Description |
|---|---|
| System.String |
ModifyAsync(Action<WebhookProperties>, RequestOptions)
Declaration
public Task ModifyAsync(Action<WebhookProperties> func, RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<WebhookProperties> | func | |
| RequestOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
UpdateAsync(RequestOptions)
Updates this object's properties with its current state.
Declaration
public Task UpdateAsync(RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RequestOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Explicit Interface Implementations
| Improve this Doc View SourceIWebhook.Channel
Gets the channel for this webhook.
Declaration
ITextChannel IWebhook.Channel { get; }
Returns
| Type | Description |
|---|---|
| ITextChannel |
IWebhook.Guild
Gets the guild owning this webhook.
Declaration
IGuild IWebhook.Guild { get; }
Returns
| Type | Description |
|---|---|
| IGuild |
IWebhook.ModifyAsync(Action<WebhookProperties>, RequestOptions)
Modifies this webhook.
Declaration
Task IWebhook.ModifyAsync(Action<WebhookProperties> func, RequestOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<WebhookProperties> | func | |
| RequestOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |