fix check for more than have, add error chat
This commit is contained in:
parent
021737ad16
commit
265a6cc9b4
|
@ -56,11 +56,13 @@ def handle_redeem(message, user_id):
|
|||
send_chat(f"Cannot redeem {redeem}, amount of points is not an integer.")
|
||||
elif int(note) < price:
|
||||
send_chat(f"Can't redeem {redeem}, your donation is below the minimum bid of {price}.")
|
||||
elif int(note) < points:
|
||||
elif int(note) > points:
|
||||
send_chat(f"Can't redeem {redeem}, you're donating more points than you have.")
|
||||
elif add_to_milestone(db, user_id, redeem, int(note)):
|
||||
send_chat(f"Succesfully donated to {redeem} milestone!")
|
||||
if check_apply_milestone_completion(db, redeem):
|
||||
send_chat(f"Milestone goal {redeem} complete!")
|
||||
else:
|
||||
send_chat(f"Redeeming {redeem} failed.")
|
||||
else:
|
||||
send_chat(f"{redeem} not redeemed, type of redeem not found.")
|
||||
|
|
Loading…
Reference in New Issue