Fix bug where message links from discord stable would be considered invalid

This commit is contained in:
runebaas 2020-08-13 20:04:54 +02:00
parent ad086a5e0c
commit 726ee77ed4
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -7,7 +7,7 @@ namespace Geekbot.Bot.Commands.Utils.Quote
public class MessageLink
{
public readonly static Regex re = new Regex(
@"https:\/\/(canary|ptb)?.discord(app)?.com\/channels\/(?<GuildId>\d{16,20})\/(?<ChannelId>\d{16,20})\/(?<MessageId>\d{16,20})",
@"https:\/\/((canary|ptb)\.)?discord(app)?.com\/channels\/(?<GuildId>\d{16,20})\/(?<ChannelId>\d{16,20})\/(?<MessageId>\d{16,20})",
RegexOptions.Compiled | RegexOptions.IgnoreCase,
new TimeSpan(0, 0, 2));