From ed3ce5286594d975dacf7b45d063631f340e977d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 4 Nov 2022 05:08:22 +0100 Subject: [PATCH] Fixed .feedadd, closes #388 --- src/NadekoBot/Modules/Searches/Feeds/FeedCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Feeds/FeedCommands.cs b/src/NadekoBot/Modules/Searches/Feeds/FeedCommands.cs index 5cde4db23..2e0181841 100644 --- a/src/NadekoBot/Modules/Searches/Feeds/FeedCommands.cs +++ b/src/NadekoBot/Modules/Searches/Feeds/FeedCommands.cs @@ -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;