- Most if not all gambling commands should now use locale-specific currency format

- Enabled preview language features
This commit is contained in:
Kwoth
2022-02-03 13:51:50 +01:00
parent eecccc8100
commit f77f2f433f
14 changed files with 72 additions and 56 deletions

View File

@@ -65,13 +65,17 @@ public partial class Gambling
await using var stream = img.ToStream(format);
foreach (var i in imgs)
i.Dispose();
var msg = count != 1
? Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flip_results(count, headCount, tailCount))
? Format.Bold(ctx.User.ToString())
+ " "
+ GetText(strs.flip_results(count, headCount, tailCount))
: Format.Bold(ctx.User.ToString())
+ " "
+ GetText(strs.flipped(headCount > 0
? Format.Bold(GetText(strs.heads))
: Format.Bold(GetText(strs.tails))));
await ctx.Channel.SendFileAsync(stream, $"{count} coins.{format.FileExtensions.First()}", msg);
}
@@ -106,12 +110,12 @@ public partial class Gambling
if (guess == result)
{
var toWin = (long)(amount * Config.BetFlip.Multiplier);
str = Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flip_guess(toWin + CurrencySign));
str = Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flip_guess(N(toWin)));
await _cs.AddAsync(ctx.User, toWin, new("betflip", "win"));
}
else
{
str = ctx.User + " " + GetText(strs.better_luck);
str = Format.Bold(ctx.User.ToString()) + " " + GetText(strs.better_luck);
}
await ctx.Channel.EmbedAsync(_eb.Create()