fix(webhook): don't try escaping backslashes in a raw string

This commit is contained in:
spiral
2021-11-22 17:05:13 -05:00
parent 51c900a378
commit 269646a455

View File

@@ -14,7 +14,7 @@ namespace PluralKit.Bot
{ {
private readonly ModelRepository _repo; private readonly ModelRepository _repo;
private readonly DispatchService _dispatch; private readonly DispatchService _dispatch;
private static readonly Regex _webhookRegex = new(@"https://(?:\\w+.)?discord(?:app)?.com/api(?:/v.*)?/webhooks/(.*)"); private static readonly Regex _webhookRegex = new("https://(?:\\w+.)?discord(?:app)?.com/api(?:/v.*)?/webhooks/(.*)");
public Api(ModelRepository repo, DispatchService dispatch) public Api(ModelRepository repo, DispatchService dispatch)
{ {
_repo = repo; _repo = repo;