mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 19:58:54 -05:00
[Trivia] Fix unresolved reference to bank.BalanceTooHigh (#4170)
Co-authored-by: douglas-cpp <douglasc.dev@gmail.com>
This commit is contained in:
parent
61df4f88b3
commit
e9017e8fe2
@ -4,7 +4,7 @@ import time
|
|||||||
import random
|
import random
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import bank
|
from redbot.core import bank, errors
|
||||||
from redbot.core.i18n import Translator
|
from redbot.core.i18n import Translator
|
||||||
from redbot.core.utils.chat_formatting import box, bold, humanize_list, humanize_number
|
from redbot.core.utils.chat_formatting import box, bold, humanize_list, humanize_number
|
||||||
from redbot.core.utils.common_filters import normalize_smartquotes
|
from redbot.core.utils.common_filters import normalize_smartquotes
|
||||||
@ -305,7 +305,7 @@ class TriviaSession:
|
|||||||
LOG.debug("Paying trivia winner: %d credits --> %s", amount, str(winner))
|
LOG.debug("Paying trivia winner: %d credits --> %s", amount, str(winner))
|
||||||
try:
|
try:
|
||||||
await bank.deposit_credits(winner, int(multiplier * score))
|
await bank.deposit_credits(winner, int(multiplier * score))
|
||||||
except bank.BalanceTooHigh as e:
|
except errors.BalanceTooHigh as e:
|
||||||
await bank.set_balance(winner, e.max_balance)
|
await bank.set_balance(winner, e.max_balance)
|
||||||
await self.ctx.send(
|
await self.ctx.send(
|
||||||
_(
|
_(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user