mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Bank] Allow bank managers to set the maximum allowed balance in the bank (#2926)
* Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now `[p]bankset maxbal` can be used to set the maximum bank balance Signed-off-by: Guy <guyreis96@gmail.com> * Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now `[p]bankset maxbal` can be used to set the maximum bank balance Signed-off-by: Guy <guyreis96@gmail.com> * Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now `[p]bankset maxbal` can be used to set the maximum bank balance Signed-off-by: Guy <guyreis96@gmail.com> * Rename method 🤦 Signed-off-by: Guy <guyreis96@gmail.com> * Updated this to be aware of #2925 Signed-off-by: guyre <27962761+drapersniper@users.noreply.github.com> * Addressed Flames review + Fixed 1 bug in errors.py + `[p]leaderboard` and `[p]bank balance` will set the users balance to max balance if the bank maxbal is lower than the previous user balance Signed-off-by: guyre <27962761+drapersniper@users.noreply.github.com> * Missed this clarification Signed-off-by: guyre <27962761+drapersniper@users.noreply.github.com> * address Flames review Signed-off-by: guyre <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
@@ -46,7 +46,7 @@ class BalanceTooHigh(BankError, OverflowError):
|
||||
self.currency_name = currency_name
|
||||
|
||||
def __str__(self) -> str:
|
||||
return _("{user}'s balance cannot rise above max {currency}.").format(
|
||||
return _("{user}'s balance cannot rise above {max} {currency}.").format(
|
||||
user=self.user, max=humanize_number(self.max_balance), currency=self.currency_name
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user