mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Fix pk;msg with message link
This commit is contained in:
parent
4c1a03bb00
commit
f618bc2403
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ namespace PluralKit.Bot.Commands {
|
|||
ulong messageId;
|
||||
if (ulong.TryParse(word, out var id))
|
||||
messageId = id;
|
||||
else if (Regex.Match(word, "https://discordapp.com/channels/\\d+/(\\d+)") is Match match && match.Success)
|
||||
else if (Regex.Match(word, "https://discordapp.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}` as a message ID or link.");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue