diff --git a/src/Discord.Net.Webhook/DiscordWebhookClient.cs b/src/Discord.Net.Webhook/DiscordWebhookClient.cs index da03698e7..176c8f5ed 100644 --- a/src/Discord.Net.Webhook/DiscordWebhookClient.cs +++ b/src/Discord.Net.Webhook/DiscordWebhookClient.cs @@ -44,7 +44,7 @@ namespace Discord.Webhook Webhook = WebhookClientHelper.GetWebhookAsync(this, webhookId).GetAwaiter().GetResult(); } /// Creates a new Webhook Discord client. - public DiscordWebhookClient(IWebhook webhook, DiscordRestConfig config) + public DiscordWebhookClient(IWebhook webhook, DiscordRestConfig config) : this(config) { Webhook = webhook; @@ -132,7 +132,7 @@ namespace Discord.Webhook if (match != null) { // ensure that the first group is a ulong, set the _webhookId - // 0th group is always the entire match, so start at index 1 + // 0th group is always the entire match, and 1 is the domain; so start at index 2 if (!(match.Groups[2].Success && ulong.TryParse(match.Groups[2].Value, NumberStyles.None, CultureInfo.InvariantCulture, out webhookId))) throw ex("The webhook Id could not be parsed.");