- Trial for rounding credit to 2 decimal
This commit is contained in:
parent
33119d26cd
commit
312a384d03
@ -184,7 +184,7 @@ class CM_BOT_HAL:
|
||||
password = f_password
|
||||
) == False:
|
||||
return(f'[Fail login] {f_username} cannot login.')
|
||||
amount = cm_bot.get_user_credit() - 0.01
|
||||
amount = round(cm_bot.get_user_credit() - 0.01, 2)
|
||||
if amount <= 0.01:
|
||||
return(f'[No enough credit] {f_username} do not have enough credit.')
|
||||
if cm_bot.transfer_credit(t_username, t_password, amount) == True:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user