Check for URL correctness

This commit is contained in:
Shikhir Arora
2017-11-16 10:30:37 -05:00
committed by GitHub
parent c49e52c241
commit 3ee00793ce

View File

@ -41,7 +41,7 @@ namespace NadekoBot.Common
embed.WithTitle(Title);
if (!string.IsNullOrWhiteSpace(Description))
embed.WithDescription(Description);
if (!string.IsNullOrWhiteSpace(url))
if (url != null && Uri.IsWellFormedUriString(url, UriKind.Absolute))
embed.WithUrl(url);
embed.WithColor(new Discord.Color(Color));
if (Footer != null)