From 9d17c130c50b886e1ebb59578c874c32bd164f6a Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 5 Apr 2021 02:39:14 +0100 Subject: [PATCH] Fix matching canary/ptb Discord links --- PluralKit.Bot/Commands/Misc.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/Misc.cs b/PluralKit.Bot/Commands/Misc.cs index ad04c60a..70a0c9ab 100644 --- a/PluralKit.Bot/Commands/Misc.cs +++ b/PluralKit.Bot/Commands/Misc.cs @@ -215,7 +215,7 @@ namespace PluralKit.Bot { ulong messageId; if (ulong.TryParse(word, out var id)) messageId = id; - else if (Regex.Match(word, "https://discord(?:app)?.com/channels/\\d+/\\d+/(\\d+)") is Match match && match.Success) + else if (Regex.Match(word, "https://(?:\\w+.)discord(?:app)?.com/channels/\\d+/\\d+/(\\d+)") is Match match && match.Success) messageId = ulong.Parse(match.Groups[1].Value); else throw new PKSyntaxError($"Could not parse {word.AsCode()} as a message ID or link.");