Make webhook avatar selection case-insensetive

This commit is contained in:
Trysdyn Black 2025-02-16 20:47:22 -08:00
parent b567252695
commit cefadb2b91

View file

@ -26,7 +26,7 @@ def webhook_online(stream) -> None:
data = {"username": f"{config.WEBHOOK_NAME} Online", "content": config.WEBHOOK_ONLINE}
if config.is_avatar_ready():
target_av = f"{stream[1]}/{stream[2]}.png"
target_av = f"{stream[1]}/{stream[2]}.png".lower()
avatar = target_av if Path(config.WEBHOOK_AVATAR_PATH, target_av).is_file() else "default.png"
data["avatar_url"] = f"{config.WEBHOOK_AVATAR_URL}/{avatar}"