Make webhook avatar selection case-insensetive
This commit is contained in:
parent
b567252695
commit
cefadb2b91
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ def webhook_online(stream) -> None:
|
||||||
data = {"username": f"{config.WEBHOOK_NAME} Online", "content": config.WEBHOOK_ONLINE}
|
data = {"username": f"{config.WEBHOOK_NAME} Online", "content": config.WEBHOOK_ONLINE}
|
||||||
|
|
||||||
if config.is_avatar_ready():
|
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"
|
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}"
|
data["avatar_url"] = f"{config.WEBHOOK_AVATAR_URL}/{avatar}"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue