dev: Using collection expressions, no functional change

This commit is contained in:
Kwoth
2024-05-13 14:54:24 +00:00
parent 52438f45e1
commit 9406a9cc34
38 changed files with 173 additions and 142 deletions

View File

@@ -58,13 +58,13 @@ public class ConverterService : INService, IReadyExecutor
var currencyRates = await GetCurrencyRates();
var baseType = new ConvertUnit
{
Triggers = new[] { currencyRates.Base },
Triggers = [currencyRates.Base],
Modifier = decimal.One,
UnitType = unitTypeString
};
var units = currencyRates.ConversionRates.Select(u => new ConvertUnit
{
Triggers = new[] { u.Key },
Triggers = [u.Key],
Modifier = u.Value,
UnitType = unitTypeString
})

View File

@@ -480,7 +480,7 @@ public partial class Utility : NadekoModule
try
{
if (tags.Length == 0)
tags = new[] { name };
tags = [name];
await ctx.Guild.CreateStickerAsync(
name,