attempt to use anilist color for embeds

This commit is contained in:
leander committed 2026-10-24 04:24:57 +02:00
1 parent 74756ed354
commit 8a5ea00c66
1 file changed
+6 -1
+6 -1
View File
@@ -32,7 +32,7 @@ class Anime(commands.Cog):
Parameters
----------
color (str): The color string returned from the Anilist API
color (str): The color string returned from the Anilist API. Either a color name or a hex code like #3db4f2
Returns
----------
@@ -48,6 +48,11 @@ class Anime(commands.Cog):
"green": 0x4CCA51,
"gray": 0x677B94,
}
if color and color.startswith("#"):
try:
return int(color[1:], 16)
except ValueError:
pass
return colors.get(color, 0x677B94)
def convert_media_format(self, media_format: str) -> str: