- Updated editorconfig rules to hopefully look a bit nicer.

- Removed configureawait(false) from everywhere as it doesnt' do anything in a console app and just makes the code look ugly
- Started using .WhenAll extension instead of Task.WhenAll to make it look nicer when chaining methods
This commit is contained in:
Kwoth
2021-12-28 21:14:26 +01:00
parent d093f7eed7
commit 723447c7d4
171 changed files with 1523 additions and 1594 deletions

View File

@@ -1,4 +1,4 @@
#nullable disable
#nullable disable
using NadekoBot.Modules.Searches.Services;
using System.Text.RegularExpressions;
@@ -40,7 +40,7 @@ public partial class Searches
channel ??= (ITextChannel)ctx.Channel;
try
{
var feeds = await CodeHollow.FeedReader.FeedReader.ReadAsync(url).ConfigureAwait(false);
var feeds = await CodeHollow.FeedReader.FeedReader.ReadAsync(url);
}
catch (Exception ex)
{
@@ -54,12 +54,12 @@ public partial class Searches
success = _service.AddFeed(ctx.Guild.Id, channel.Id, url);
if (success)
{
await ReplyConfirmLocalizedAsync(strs.feed_added).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.feed_added);
return;
}
}
await ReplyConfirmLocalizedAsync(strs.feed_not_valid).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.feed_not_valid);
}
[NadekoCommand, Aliases]
@@ -69,10 +69,10 @@ public partial class Searches
{
if (_service.RemoveFeed(ctx.Guild.Id, --index))
{
await ReplyConfirmLocalizedAsync(strs.feed_removed).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.feed_removed);
}
else
await ReplyErrorLocalizedAsync(strs.feed_out_of_range).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.feed_out_of_range);
}
[NadekoCommand, Aliases]
@@ -86,8 +86,7 @@ public partial class Searches
{
await ctx.Channel.EmbedAsync(_eb.Create()
.WithOkColor()
.WithDescription(GetText(strs.feed_no_feed)))
.ConfigureAwait(false);
.WithDescription(GetText(strs.feed_no_feed)));
return;
}
@@ -102,7 +101,7 @@ public partial class Searches
return embed.WithDescription(fs);
}, feeds.Count, 10).ConfigureAwait(false);
}, feeds.Count, 10);
}
}
}