Browse Source

Patch; Regex doesnt respect case-sensitive url's

pull/2078/head
Armano den Boef 3 years ago
parent
commit
7891dc2d52
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Webhook/DiscordWebhookClient.cs

+ 1
- 1
src/Discord.Net.Webhook/DiscordWebhookClient.cs View File

@@ -33,7 +33,7 @@ namespace Discord.Webhook
: this(webhookUrl, new DiscordRestConfig()) { }

// regex pattern to match webhook urls
private static Regex WebhookUrlRegex = new Regex(@"^.*(discord|discordapp)\.com\/api\/webhooks\/([\d]+)\/([a-z0-9_-]+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
private static Regex WebhookUrlRegex = new Regex(@"^.*(discord|discordapp)\.com\/api\/webhooks\/([\d]+)\/([a-zA-Z0-9_-]+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);

/// <summary> Creates a new Webhook Discord client. </summary>
public DiscordWebhookClient(ulong webhookId, string webhookToken, DiscordRestConfig config)


Loading…
Cancel
Save