Skip to content

Commit

Permalink
cast timespan result to int (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostiDrinks authored Nov 6, 2024
1 parent 2b8e8d3 commit f9263dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,11 +1141,11 @@ async def givedonator(ctx: Context) -> str | None:
return "Invalid timespan."

if target.donor_end < time.time():
timespan += int(time.time())
timespan += time.time()
else:
timespan += target.donor_end

target.donor_end = timespan
target.donor_end = int(timespan)
await app.state.services.database.execute(
"UPDATE users SET donor_end = :end WHERE id = :user_id",
{"end": timespan, "user_id": target.id},
Expand Down

0 comments on commit f9263dd

Please sign in to comment.