make sure object has color attribute

This commit is contained in:
LBlend committed 2022-11-15 03:59:15 +01:00
1 parent 8e69bad1c8
commit ff9f8f7e31
1 file changed
+1 -1
+1 -1
View File
@@ -13,7 +13,7 @@ def get_color(discord_object: discord.User | discord.Member | discord.Role) -> d
-----------
(discord.Color): The user's displayed color
"""
if str(discord_object.color) != '#000000':
if hasattr(discord_object, "color") and str(discord_object.color) != '#000000':
return discord_object.color
return discord.Colour(0x99AAB5)