Skip to content

Commit

Permalink
[trade] changing "this interaction ends in 30 mins" to a discord time…
Browse files Browse the repository at this point in the history
…stamp (#381)

* changing "this interaction ends in 30 mins" to timestamp

* adding the imports to make the code work

* handling the timestamp logic with format_dt

* removing the variable self.end_time

* testing to see if this solves the conflict, will revert if not

* reverting changes

* small syntax error fix

* Use utcnow from utils

---------

Co-authored-by: flaree <flare2399@gmail.com>
  • Loading branch information
imtherealF1 and flaree authored Sep 6, 2024
1 parent 061f217 commit 979cdf0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ballsdex/packages/trade/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import discord
from discord.ui import Button, View, button
from discord.utils import format_dt, utcnow

from ballsdex.core.models import BallInstance, Player, Trade, TradeObject
from ballsdex.core.utils import menus
Expand Down Expand Up @@ -175,9 +176,10 @@ def _generate_embed(self):
f"using the {add_command} and {remove_command} commands.\n"
"Once you're finished, click the lock button below to confirm your proposal.\n"
"You can also lock with nothing if you're receiving a gift.\n\n"
"*You have 30 minutes before this interaction ends.*\n\n"
f"Use the {view_command} command to see the full "
f"list of {settings.plural_collectible_name}."
"*This trade will timeout "
f"{format_dt(utcnow() + timedelta(minutes=30), style='R')}.*\n\n"
f"Use the {view_command} command to see the full"
f" list of {settings.plural_collectible_name}."
)
self.embed.set_footer(
text="This message is updated every 15 seconds, "
Expand Down

0 comments on commit 979cdf0

Please sign in to comment.