Fallback to user id instead of just unknown

This commit is contained in:
Firepup Sixfifty 2024-06-04 17:16:50 -05:00
parent 204ed76bed
commit e62458ee5e
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -36,7 +36,7 @@ print("All pages loaded, generating user mappings now.")
del pages
user_mappings = {}
for user in users_list:
user_mappings[f"<@{user['id']}>"] = "@"+user["profile"]["display_name"] if user["profile"]["display_name"] else "@missing_display_name"
user_mappings[f"<@{user['id']}>"] = f'<@{user["profile"]["display_name"]}>' if user["profile"]["display_name"] else "<@{user['id']}>"
print("User mappings loaded. User count:", len(user_mappings))