aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Akarys42 <[email protected]>2019-10-21 17:07:39 +0200
committerGravatar Akarys42 <[email protected]>2019-10-21 17:11:52 +0200
commit0b020642c8df1133d87ee650741026e33f7570f4 (patch)
tree2e7ec17b2dca7b17fe422c55c10bcdae232a5549
parentMerge branch 'master' of https://github.com/python-discord/bot into reminder-up (diff)
Update send_reminder message creation
It is now truly backward compatible and use a more DRY method
-rw-r--r--bot/cogs/reminders.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
index b8dafcd05..8adebb04b 100644
--- a/bot/cogs/reminders.py
+++ b/bot/cogs/reminders.py
@@ -101,13 +101,13 @@ class Reminders(Scheduler, Cog):
embed.colour = Colour.blurple()
embed.set_author(
icon_url=Icons.remind_blurple,
- name="It has arrived!")
+ name="It has arrived!"
+ )
+
+ embed.description = f"Here's your reminder: `{reminder['content']}`."
- if "jump_url" in reminder: # keep backward compatibility
- embed.description = (f"Here's your reminder: `{reminder['content']}`.\n"
- f"[Jump back to when you created the reminder]({reminder['jump_url']})")
- else:
- 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()