Class WebhookClient
- Namespace
- NetCord.Rest
- Assembly
- NetCord.dll
public sealed class WebhookClient : IDisposable
- Inheritance
-
WebhookClient
- Implements
-
- Inherited Members
-
Constructors
WebhookClient(ulong, string, WebhookClientConfiguration?)
public WebhookClient(ulong webhookId, string webhookToken, WebhookClientConfiguration? configuration = null)
Parameters
webhookId
ulong
webhookToken
string
configuration
WebhookClientConfiguration
Properties
Id
Property Value
- ulong
Token
public string Token { get; }
Property Value
- string
Methods
DeleteAsync(RestRequestProperties?, CancellationToken)
public Task DeleteAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task
DeleteMessageAsync(ulong, ulong?, RestRequestProperties?, CancellationToken)
public Task DeleteMessageAsync(ulong messageId, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
messageId
ulong
threadId
ulong?
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task
Dispose()
ExecuteAsync(WebhookMessageProperties, bool, ulong?, RestRequestProperties?, CancellationToken)
public Task<RestMessage?> ExecuteAsync(WebhookMessageProperties message, bool wait = false, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
message
WebhookMessageProperties
wait
bool
threadId
ulong?
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<RestMessage>
GetAsync(RestRequestProperties?, CancellationToken)
public Task<Webhook> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<Webhook>
GetMessageAsync(ulong, RestRequestProperties?, CancellationToken)
public Task<RestMessage> GetMessageAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
messageId
ulong
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<RestMessage>
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>
ModifyMessageAsync(ulong, Action<MessageOptions>, ulong?, RestRequestProperties?, CancellationToken)
public Task<RestMessage> ModifyMessageAsync(ulong messageId, Action<MessageOptions> action, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
messageId
ulong
action
Action<MessageOptions>
threadId
ulong?
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<RestMessage>