Describe the bug
In some cases the % ends up exceeding the actual balance, this probably due to python rounding when casting to ints
To Reproduce
have a balance of 7,847,709,332,162,940 M¢
!invest 100%
bot doesnt take it
Expected behavior
Invest all your money
TO FIX:
change
# Allows input such as '!invest 100%' and '!invest 50%' if suffix == '%': amount = int((investor.balance / 100) * int(amount))
to:
# Allows input such as '!invest 100%' and '!invest 50%' if suffix == '%': amount = int((investor.balance) * int(amount/100))
should also fix the error with one coin left after invest 100%
Describe the bug In some cases the % ends up exceeding the actual balance, this probably due to python rounding when casting to ints
To Reproduce
Expected behavior Invest all your money
TO FIX: change
# Allows input such as '!invest 100%' and '!invest 50%' if suffix == '%': amount = int((investor.balance / 100) * int(amount))
to:# Allows input such as '!invest 100%' and '!invest 50%' if suffix == '%': amount = int((investor.balance) * int(amount/100))
should also fix the error with one coin left after invest 100%