Fixed .feedadd, closes #388

This commit is contained in:
Kwoth
2022-11-04 05:08:22 +01:00
parent f5f0f1e250
commit ed3ce52865

View File

@@ -32,8 +32,8 @@ public partial class Searches
[UserPerm(GuildPerm.ManageMessages)]
public async Task Feed(string url, [Leftover] ITextChannel channel = null)
{
if (Uri.TryCreate(url, UriKind.Absolute, out var uri)
&& (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps))
if (!Uri.TryCreate(url, UriKind.Absolute, out var uri)
|| uri.Scheme != Uri.UriSchemeHttp || uri.Scheme != Uri.UriSchemeHttps)
{
await ReplyErrorLocalizedAsync(strs.feed_invalid_url);
return;