Class RestWebhook
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
AvatarId
Gets the ID of this webhook's default avatar.
public string AvatarId { get; }
Property Value
ChannelId
Gets the ID of the channel for this webhook; null for Application webhooks.
public ulong? ChannelId { get; }
Property Value
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
FollowedChannelId
Gets the id of the followed channel. null if Type is not ChannelFollower.
public ulong? FollowedChannelId { get; }
Property Value
FollowedChannelName
Gets the name of the followed channel. null if Type is not ChannelFollower.
public string FollowedChannelName { get; }
Property Value
GuildId
Gets the ID of the guild owning this webhook.
public ulong? GuildId { get; }
Property Value
Name
Gets the default name of this webhook.
public string Name { get; }
Property Value
PartialGuild
Gets the partial guild of the followed channel. null if Type is not ChannelFollower.
public PartialGuild PartialGuild { get; }
Property Value
Token
Gets the token of this webhook; null if the Type is ChannelFollower.
public string Token { get; }
Property Value
Type
Gets the type of this webhook.
public WebhookType Type { get; }
Property Value
Methods
DeleteAsync(RequestOptions)
Deletes this object and all its children.
public Task DeleteAsync(RequestOptions options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
GetAvatarUrl(ImageFormat, ushort)
Gets the URL to this webhook's default avatar.
public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
Parameters
format
ImageFormatsize
ushort
Returns
ModifyAsync(Action<WebhookProperties>, RequestOptions)
public Task ModifyAsync(Action<WebhookProperties> func, RequestOptions options = null)
Parameters
func
Action<WebhookProperties>options
RequestOptions
Returns
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
RequestOptionsThe options to be used when sending the request.