Class DiscordWebhookClient
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
Represents a webhook-only client. This client can be used to execute Discord Webhooks.
public class DiscordWebhookClient
- Inheritance
-
DiscordWebhookClient
- Inherited Members
Constructors
- DiscordWebhookClient()
Creates a new webhook client.
- DiscordWebhookClient(IWebProxy, TimeSpan?, bool, ILoggerFactory, LogLevel, string)
Creates a new webhook client, with specified HTTP proxy, timeout, and logging settings.
Properties
- AvatarUrl
Gets or set the avatar for registered webhooks. Note that this only takes effect when broadcasting.
- Logger
Gets the logger for this client.
- Username
Gets or sets the username for registered webhooks. Note that this only takes effect when broadcasting.
- Webhooks
Gets the collection of registered webhooks.
Methods
- AddWebhook(DiscordWebhook)
Registers a webhook with this client. This reuses the supplied webhook object.
- AddWebhookAsync(ulong, BaseDiscordClient)
Registers a webhook with this client. This retrieves a webhook using the supplied full discord client.
- AddWebhookAsync(ulong, string)
Registers a webhook with this client. This retrieves a webhook based on the ID and token supplied.
- AddWebhookAsync(Uri)
Registers a webhook with this client. This retrieves a webhook from webhook URL.
- BroadcastMessageAsync(DiscordWebhookBuilder)
Broadcasts a message to all registered webhooks.
- GetRegisteredWebhook(ulong)
Gets a registered webhook with specified ID.
- RemoveWebhook(ulong)
Unregisters a webhook with this client.