await usings and minor cleanup

This commit is contained in:
Kwoth
2021-12-20 03:02:02 +01:00
parent 1b2017024c
commit da2ee0c158
55 changed files with 176 additions and 174 deletions

View File

@@ -172,7 +172,7 @@ public partial class Gambling
Interlocked.Add(ref _totalPaidOut, result.Won);
long ownedAmount;
using (var uow = _db.GetDbContext())
await using (var uow = _db.GetDbContext())
{
ownedAmount = uow.Set<DiscordUser>()
.FirstOrDefault(x => x.UserId == ctx.User.Id)
@@ -243,7 +243,7 @@ public partial class Gambling
msg = GetText(strs.slot_jackpot(30));
}
using (var imgStream = bgImage.ToStream())
await using (var imgStream = bgImage.ToStream())
{
await ctx.Channel.SendFileAsync(imgStream,
filename: "result.png",