add: Added user param to .bank balance command, but only Bot Owner can use it

This commit is contained in:
Kwoth
2024-07-11 18:46:09 +00:00
parent 9d2268a925
commit a50a7b3b0e
3 changed files with 24 additions and 0 deletions

View File

@@ -73,6 +73,27 @@ public partial class Gambling
await Response().Error(strs.cant_dm).SendAsync();
}
}
[Cmd]
[OwnerOnly]
public async Task BankBalance([Leftover] IUser user)
{
var bal = await _bank.GetBalanceAsync(user.Id);
var eb = _sender.CreateEmbed()
.WithOkColor()
.WithDescription(GetText(strs.bank_balance_other(user.ToString(), N(bal))));
try
{
await Response().User(ctx.User).Embed(eb).SendAsync();
await ctx.OkAsync();
}
catch
{
await Response().Error(strs.cant_dm).SendAsync();
}
}
private async Task BankTakeInternalAsync(long amount, ulong userId)
{