From 889fd9be49ccad36b9c4da419bb8751799757298 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Wed, 5 Jun 2024 12:48:18 -0500 Subject: [PATCH] Fallback to `real_name`s if a user has no `display_name` --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 2030069..8b961d7 100644 --- a/main.py +++ b/main.py @@ -50,7 +50,10 @@ except ImportError: userMappings[f"<@{user['id']}>"] = ( f"<@{user['profile']['display_name']}>" if user["profile"]["display_name"] - else f"<@{user['id']}>" + else ( + f"<@{user['profile']['real_name']}>" + if user["profile"]["real_name"] + else f"<@{user['id']}>") ) print("All mappings generated, writing cache file now...") with open("cache.py", "w") as cacheFile: