diff options
-rw-r--r-- | bot/cogs/reminders.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py index b54622306..81990704b 100644 --- a/bot/cogs/reminders.py +++ b/bot/cogs/reminders.py @@ -2,7 +2,7 @@ import asyncio import logging import random import textwrap -from datetime import datetime +from datetime import datetime, timedelta from operator import itemgetter from typing import Optional @@ -104,7 +104,10 @@ class Reminders(Scheduler, Cog): name="It has arrived!" ) - embed.description = f"Here's your reminder: `{reminder['content']}`" + embed.description = f"Here's your reminder: `{reminder['content']}`." + + if reminder.get("jump_url"): # keep backward compatibility + embed.description += f"\n[Jump back to when you created the reminder]({reminder['jump_url']})" if late: embed.colour = Colour.red() @@ -167,14 +170,18 @@ class Reminders(Scheduler, Cog): json={ 'author': ctx.author.id, 'channel_id': ctx.message.channel.id, + 'jump_url': ctx.message.jump_url, 'content': content, 'expiration': expiration.isoformat() } ) + now = datetime.utcnow() - timedelta(seconds=1) + # Confirm to the user that it worked. await self._send_confirmation( - ctx, on_success="Your reminder has been created successfully!" + ctx, + on_success=f"Your reminder will arrive in {humanize_delta(relativedelta(expiration, now))}!" ) loop = asyncio.get_event_loop() |