aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-04-21 16:48:30 +0200
committerGravatar GitHub <[email protected]>2021-04-21 16:48:30 +0200
commitce819ade482e82ecbc474bce5fb8ac9dd8b37b40 (patch)
treee813bd27891bc0ec95f4474f22bb69340ab67bd2
parentMerge pull request #1535 from francisdbillones/patch-1 (diff)
parentchore: Revert back to 'Due' (diff)
Merge pull request #1546 from ToxicKidz/remind-embed-timestamp
Use Embed.timestamp for the !remind command
-rw-r--r--bot/exts/utils/reminders.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/bot/exts/utils/reminders.py b/bot/exts/utils/reminders.py
index 3113a1149..6c21920a1 100644
--- a/bot/exts/utils/reminders.py
+++ b/bot/exts/utils/reminders.py
@@ -90,15 +90,18 @@ class Reminders(Cog):
delivery_dt: t.Optional[datetime],
) -> None:
"""Send an embed confirming the reminder change was made successfully."""
- embed = discord.Embed()
- embed.colour = discord.Colour.green()
- embed.title = random.choice(POSITIVE_REPLIES)
- embed.description = on_success
+ embed = discord.Embed(
+ description=on_success,
+ colour=discord.Colour.green(),
+ title=random.choice(POSITIVE_REPLIES)
+ )
footer_str = f"ID: {reminder_id}"
+
if delivery_dt:
# Reminder deletion will have a `None` `delivery_dt`
- footer_str = f"{footer_str}, Due: {delivery_dt.strftime('%Y-%m-%dT%H:%M:%S')}"
+ footer_str += ', Due'
+ embed.timestamp = delivery_dt
embed.set_footer(text=footer_str)