mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-09 02:42:30 -05:00
Humanize number fix (#6283)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
@@ -8,6 +8,9 @@ __all__ = ("finite_float",)
|
||||
_ = Translator("Trivia", __file__)
|
||||
|
||||
|
||||
MAX_VALUE = 2**63 - 1
|
||||
|
||||
|
||||
def finite_float(arg: str) -> float:
|
||||
try:
|
||||
ret = float(arg)
|
||||
|
||||
@@ -8,6 +8,7 @@ from redbot.core import bank, errors
|
||||
from redbot.core.i18n import Translator
|
||||
from redbot.core.utils.chat_formatting import box, bold, humanize_list, humanize_number
|
||||
from redbot.core.utils.common_filters import normalize_smartquotes
|
||||
from .converters import MAX_VALUE
|
||||
from .log import LOG
|
||||
|
||||
__all__ = ["TriviaSession"]
|
||||
@@ -320,6 +321,7 @@ class TriviaSession:
|
||||
if not winners or num_humans < 3:
|
||||
return
|
||||
payout = int(top_score * multiplier / len(winners))
|
||||
payout = MAX_VALUE if payout > MAX_VALUE else payout
|
||||
if payout <= 0:
|
||||
return
|
||||
for winner in winners:
|
||||
|
||||
Reference in New Issue
Block a user