Repository: python-discord/bot

Issue:
Reminder details in confirmation message.
The reminder command currently only replies with `Your reminder has been created successfully!`. 

This can be improved by providing the actual reminder contents in the confirmation and the datetime / humanized timedelta the reminder will be due to ensure the intended duration was processed. 

For the message sent once the reminder is due, a jump url to the original command message so we can jump back into context of the conversation when the reminder was made would be good to add. (Previously had mixed up wording for this section).

This would do well as a first issue if it's not gotten to in short time.


Discussion:
I disagree. What's the use of a jump link to the command message? It will simply be the previous message anyways. The humanized timestamp is already given in by the user, too.
Maybe it would be more beneficial to include the jump to command URL in the actual reminder so when a user gets a reminder they can jump back to when they set it.
Sorry, yes I definitely got some wires crossed while writing the Issue. My intention was to have the jump_url not in the initial reply but the eventual notice. Thanks @jchristgit for correcting me.

Regarding the timestamp, it's best to have some of confirmation on it due to the confusion that can occur. You're assuming that everyone knows exactly 100% for sure what formatting they're meant to be using, when the reality is that people can easily assume things or mistaken things. The recent change with `m` vs `M` is a good example of this. It would be best for the user to be aware immediately that it was processed as 30 months if their intention was to be only 30 minutes.
I'm confused as to what we're actually wanting to implement here.  Currently the reminder itself gives the reason why you set it, correct?  What were we needing the link URL for?  To look at the context for when it was originally made?

And regarding the timestamp thing, are we wanting to just update the !help for it to make things clearer?  Or a link to the standard formatting for such things?
Yes, a jumplink to the message where the reminder was set for additional context.

For the timestamp, here's what's currently given when you set a reminder:
![image](https://user-images.githubusercontent.com/5323929/50850943-60422a00-1349-11e9-96fa-bf00cbc050e0.png)
Which doesn't give us any indication of when the reminder is going to come. So something like "it will arrive in 3 hours" would be helpful to confirm that the correct duration was input.

Resolving patch:
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
--- a/bot/cogs/reminders.py
+++ b/bot/cogs/reminders.py
@@ -2,7 +2,7 @@
 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 @@ async def send_reminder(self, reminder: dict, late: relativedelta = None) -> Non
             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 @@ async def new_reminder(self, ctx: Context, expiration: Duration, *, content: str
             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()


Test patch: