- 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.Administration.Services;
namespace NadekoBot.Modules.Administration;
@@ -51,13 +51,13 @@ public partial class Administration
.WithDescription(string.Join("\n", timezoneStrings
.Skip(curPage * timezonesPerPage)
.Take(timezonesPerPage))),
timezones.Length, timezonesPerPage).ConfigureAwait(false);
timezones.Length, timezonesPerPage);
}
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Timezone()
=> await ReplyConfirmLocalizedAsync(strs.timezone_guild(_service.GetTimeZoneOrUtc(ctx.Guild.Id))).ConfigureAwait(false);
=> await ReplyConfirmLocalizedAsync(strs.timezone_guild(_service.GetTimeZoneOrUtc(ctx.Guild.Id)));
[NadekoCommand, Aliases]
[RequireContext(ContextType.Guild)]
@@ -70,12 +70,12 @@ public partial class Administration
if (tz is null)
{
await ReplyErrorLocalizedAsync(strs.timezone_not_found).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.timezone_not_found);
return;
}
_service.SetTimeZone(ctx.Guild.Id, tz);
await SendConfirmAsync(tz.ToString()).ConfigureAwait(false);
await SendConfirmAsync(tz.ToString());
}
}
}