Humanize number fix (#6283)

Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
aikaterna
2024-01-03 16:13:26 -08:00
committed by GitHub
parent 47a267b38b
commit 531b4fe357
6 changed files with 26 additions and 5 deletions

View File

@@ -758,9 +758,17 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
"""Set a price for queueing tracks for non-mods, 0 to disable."""
if price < 0:
return await self.send_embed_msg(
ctx, title=_("Invalid Price"), description=_("Price can't be less than zero.")
ctx,
title=_("Invalid Price"),
description=_("Price can't be less than zero."),
)
if price == 0:
elif price > 2**63 - 1:
return await self.send_embed_msg(
ctx,
title=_("Invalid Price"),
description=_("Price can't be greater than 2^63 - 1."),
)
elif price == 0:
jukebox = False
await self.send_embed_msg(
ctx, title=_("Setting Changed"), description=_("Jukebox mode disabled.")