aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-08-22 21:00:34 +0200
committerGravatar GitHub <[email protected]>2021-08-22 21:00:34 +0200
commitee23d6759204e90b930c98fea24d47a23649f027 (patch)
tree6582357b66e9522921dc4c2f4c20b3547c9fb3b5
parentMerge pull request #1761 from python-discord/log-info-reminder-replies (diff)
parentFix edge-case of `user.joined_at` being `None` in userinfo command. (diff)
Merge pull request #1764 from python-discord/TizzySaurus-patch-1
Fix edge-case of `user.joined_at` being `None` in userinfo command.
-rw-r--r--bot/exts/info/information.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 83ca59bea..85d3c0e73 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -257,7 +257,11 @@ class Information(Cog):
badges.append(emoji)
if on_server:
- joined = discord_timestamp(user.joined_at, TimestampFormats.RELATIVE)
+ if user.joined_at:
+ joined = discord_timestamp(user.joined_at, TimestampFormats.RELATIVE)
+ else:
+ joined = "Unable to get join date"
+
# The 0 is for excluding the default @everyone role,
# and the -1 is for reversing the order of the roles to highest to lowest in hierarchy.
roles = ", ".join(role.mention for role in user.roles[:0:-1])