diff options
| author | 2019-02-08 18:46:50 +0100 | |
|---|---|---|
| committer | 2019-02-08 18:46:50 +0100 | |
| commit | b7ab0ab8a2cf622cc44e879e219fcb168324712c (patch) | |
| tree | e61d1e9390559949d6ffce0f82466a0bc80abb2a | |
| parent | Updating watched user embed title to include cache status (diff) | |
Adding watch time delta to big-brother header embed
| -rw-r--r-- | bot/cogs/bigbrother.py | 7 |
1 files changed, 7 insertions, 0 deletions
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) |