mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules
This commit is contained in:
@@ -57,11 +57,15 @@ public class ConverterService : INService, IReadyExecutor
|
||||
var currencyRates = await GetCurrencyRates();
|
||||
var baseType = new ConvertUnit
|
||||
{
|
||||
Triggers = new[] { currencyRates.Base }, Modifier = decimal.One, UnitType = unitTypeString
|
||||
Triggers = new[] { currencyRates.Base },
|
||||
Modifier = decimal.One,
|
||||
UnitType = unitTypeString
|
||||
};
|
||||
var range = currencyRates.ConversionRates.Select(u => new ConvertUnit
|
||||
{
|
||||
Triggers = new[] { u.Key }, Modifier = u.Value, UnitType = unitTypeString
|
||||
Triggers = new[] { u.Key },
|
||||
Modifier = u.Value,
|
||||
UnitType = unitTypeString
|
||||
})
|
||||
.ToArray();
|
||||
|
||||
|
@@ -9,7 +9,7 @@ public partial class Utility
|
||||
public partial class UnitConverterCommands : NadekoSubmodule<ConverterService>
|
||||
{
|
||||
[Cmd]
|
||||
public async partial Task ConvertList()
|
||||
public async partial Task ConvertList()
|
||||
{
|
||||
var units = _service.Units;
|
||||
|
||||
@@ -17,8 +17,10 @@ public partial class Utility
|
||||
|
||||
|
||||
foreach (var g in units.GroupBy(x => x.UnitType))
|
||||
{
|
||||
embed.AddField(g.Key.ToTitleCase(),
|
||||
string.Join(", ", g.Select(x => x.Triggers.FirstOrDefault()).OrderBy(x => x)));
|
||||
}
|
||||
|
||||
await ctx.Channel.EmbedAsync(embed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user