Skip to content

Commit

Permalink
⏯ Trying something..
Browse files Browse the repository at this point in the history
  • Loading branch information
tookender committed Sep 15, 2024
1 parent 526599d commit 3db55a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/economy/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def callback(self, interaction: Interaction):
selected_job = self.values[0]
await interaction.client.pool.execute(
"UPDATE economy SET job = $1, last_claim = $2 WHERE user_id = $3",
selected_job, datetime.datetime.now(datetime.timezone.utc), interaction.user.id
selected_job, discord.utils.utcnow(), interaction.user.id
)


Expand All @@ -82,9 +82,9 @@ async def claim_income(self, ctx, user_job):
last_claim = await self.bot.pool.fetchval("SELECT last_claim FROM economy WHERE user_id = $1", ctx.author.id)

if last_claim is None:
last_claim = datetime.datetime.now(datetime.timezone.utc)
last_claim = discord.utils.utcnow()

now = datetime.datetime.now(datetime.timezone.utc)
now = discord.utils.utcnow()
hours_passed = (now - last_claim).total_seconds() // 3600 # Convert seconds to hours

if hours_passed < 1:
Expand Down

0 comments on commit 3db55a3

Please sign in to comment.