fix buy me a coffee bug

This commit is contained in:
BennyThink 2021-08-26 19:38:01 +08:00
parent d951513a3e
commit b93ed1a323
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481

View file

@ -241,7 +241,9 @@ class BuyMeACoffee:
def get_user_payment(self, email: "str") -> ("int", "float", "str"):
order = self._get_bmac_status(email)
amount = float(order.get("support_coffee_price", 0))
price = float(order.get("support_coffee_price", 0))
cups = float(order.get("support_coffees", 1))
amount = price * cups
level = math.floor(amount / MULTIPLY)
return level, amount, email