diff --git a/src/Discord.Net.Webhook/DiscordWebhookClient.cs b/src/Discord.Net.Webhook/DiscordWebhookClient.cs index 2a0de5ef7..33da596e5 100644 --- a/src/Discord.Net.Webhook/DiscordWebhookClient.cs +++ b/src/Discord.Net.Webhook/DiscordWebhookClient.cs @@ -56,8 +56,13 @@ namespace Discord.Webhook /// The url of the webhook. /// The configuration options to use for this client. /// Thrown if the is an invalid format. + /// Thrown if the is null or whitespace. public DiscordWebhookClient(string webhookUrl, DiscordRestConfig config) : this(config) { + if (string.IsNullOrWhiteSpace(webhookUrl)) + throw new ArgumentNullException(paramName: nameof(webhookUrl), message: + "The given webhook Url cannot be null or whitespace."); + // thrown when groups are not populated/valid, or when there is no match ArgumentException ex() => new ArgumentException(paramName: nameof(webhookUrl), message: "The given webhook Url was not in a valid format.");