mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
make sure object has color attribute
This commit is contained in:
1 file changed
+1
-1
@@ -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)
|
||||
Reference in new issue
Block a user