From b7ab0ab8a2cf622cc44e879e219fcb168324712c Mon Sep 17 00:00:00 2001 From: SebastiaanZ <33516116+SebastiaanZ@users.noreply.github.com> Date: Fri, 8 Feb 2019 18:46:50 +0100 Subject: Adding watch time delta to big-brother header embed --- bot/cogs/bigbrother.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/cogs/bigbrother.py b/bot/cogs/bigbrother.py index 421f68ba7..779660327 100644 --- a/bot/cogs/bigbrother.py +++ b/bot/cogs/bigbrother.py @@ -246,6 +246,13 @@ class BigBrother: # Adding nomination info to author_field author_field = f"{author_field} (nominated {time_delta} by {actor})" + else: + if inserted_at: + # Get time delta since insertion + date_time = parse_rfc1123(inserted_at).replace(tzinfo=None) + time_delta = time_since(date_time, precision="minutes", max_units=1) + + author_field = f"{author_field} (added {time_delta})" embed = Embed(description=f"{message.author.mention} in [#{message.channel.name}]({message.jump_url})") embed.set_author(name=author_field, icon_url=message.author.avatar_url) -- cgit v1.2.3