From 54d9a800899e59fecb281d2ca378998fcf10d0a6 Mon Sep 17 00:00:00 2001 From: koko210Serve Date: Thu, 5 Mar 2026 22:16:14 +0200 Subject: [PATCH] fixed webhook pfp for regular miku being wrong when evil mode active --- bot/utils/bipolar_mode.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bot/utils/bipolar_mode.py b/bot/utils/bipolar_mode.py index 34ccfe9..76cf400 100644 --- a/bot/utils/bipolar_mode.py +++ b/bot/utils/bipolar_mode.py @@ -263,14 +263,21 @@ def get_persona_avatar_urls() -> dict: """Get current avatar URLs for Miku and Evil Miku personas. 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). - Evil Miku falls back to the webhook's stored avatar (passed as None). + When Evil Mode is inactive, uses the bot's current Discord avatar for Miku. + 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 evil_url = None - # For Miku: use the bot's actual Discord avatar URL (always matches current pfp) - if globals.client and globals.client.user: + # For Miku: use the bot's actual Discord avatar URL only when Evil Mode is + # 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: miku_url = str(globals.client.user.display_avatar.url) except Exception: