- Trial for rounding credit to 2 decimal

This commit is contained in:
Wong Yiek Heng 2025-10-06 08:01:39 +08:00
parent 33119d26cd
commit 312a384d03

View File

@ -184,7 +184,7 @@ class CM_BOT_HAL:
password = f_password password = f_password
) == False: ) == False:
return(f'[Fail login] {f_username} cannot login.') 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: if amount <= 0.01:
return(f'[No enough credit] {f_username} do not have enough credit.') return(f'[No enough credit] {f_username} do not have enough credit.')
if cm_bot.transfer_credit(t_username, t_password, amount) == True: if cm_bot.transfer_credit(t_username, t_password, amount) == True: