fixed webhook pfp for regular miku being wrong when evil mode active
This commit is contained in:
@@ -263,14 +263,21 @@ def get_persona_avatar_urls() -> dict:
|
|||||||
"""Get current avatar URLs for Miku and Evil Miku personas.
|
"""Get current avatar URLs for Miku and Evil Miku personas.
|
||||||
|
|
||||||
Returns a dict with 'miku' and 'evil_miku' avatar URL strings (or None).
|
Returns a dict with 'miku' and 'evil_miku' avatar URL strings (or None).
|
||||||
Uses the bot's current Discord avatar for Miku (always up-to-date).
|
When Evil Mode is inactive, uses the bot's current Discord avatar for Miku.
|
||||||
Evil Miku falls back to the webhook's stored avatar (passed as None).
|
When Evil Mode is active, the bot account avatar has been changed to the evil
|
||||||
|
pfp, so returning None for Miku causes the webhook to fall back to its own
|
||||||
|
stored avatar (set to current.png by update_webhook_avatars), preventing
|
||||||
|
both webhooks from showing the evil pfp.
|
||||||
|
Evil Miku always falls back to the webhook's stored avatar (passed as None).
|
||||||
"""
|
"""
|
||||||
miku_url = None
|
miku_url = None
|
||||||
evil_url = None
|
evil_url = None
|
||||||
|
|
||||||
# For Miku: use the bot's actual Discord avatar URL (always matches current pfp)
|
# For Miku: use the bot's actual Discord avatar URL only when Evil Mode is
|
||||||
if globals.client and globals.client.user:
|
# not active. When Evil Mode is on, the bot account avatar has been swapped
|
||||||
|
# to evil_pfp.png, so we pass None here and let the Miku webhook use its
|
||||||
|
# own correctly-stored avatar (current.png) instead.
|
||||||
|
if not globals.EVIL_MODE and globals.client and globals.client.user:
|
||||||
try:
|
try:
|
||||||
miku_url = str(globals.client.user.display_avatar.url)
|
miku_url = str(globals.client.user.display_avatar.url)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user