mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
add: Added user param to .bank balance command, but only Bot Owner can use it
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -4265,8 +4265,10 @@ bankbalance:
|
||||
Shows how much currency is in your bank account.
|
||||
This differs from your cash amount, as the cash amount is publicly available, but only you have access to your bank balance.
|
||||
However, you have to withdraw it first in order to use it.
|
||||
Bot Owner can also check another user's bank balance.
|
||||
ex:
|
||||
- ''
|
||||
- '@User'
|
||||
params:
|
||||
- {}
|
||||
banktake:
|
||||
|
@@ -1040,6 +1040,7 @@
|
||||
"medusa_already_loaded": "Medusa {0} is already loaded",
|
||||
"medusa_invalid_not_found": "Medusa with that name wasn't found or the file was invalid",
|
||||
"bank_balance": "You have {0} in your bank account.",
|
||||
"bank_balance_other": "User {0} has {1} in the bank.",
|
||||
"bank_deposited": "You deposited {0} to your bank account.",
|
||||
"bank_withdrew": "You withdrew {0} from your bank account.",
|
||||
"bank_withdraw_insuff": "You don't have sufficient {0} in your bank account.",
|
||||
|
Reference in New Issue
Block a user