Fix webhook avatar mismatch: pass avatar_url at send time
- Fixed missing client parameter in animated GIF webhook update path - Added get_persona_avatar_urls() helper that returns bot's current Discord avatar URL for Miku persona (always fresh, no cache lag) - Pass avatar_url on every webhook.send() call in bipolar_mode.py, persona_dialogue.py, and api.py so avatars always match current pfp regardless of webhook cache state
This commit is contained in:
@@ -442,10 +442,13 @@ class ProfilePictureManager:
|
||||
|
||||
# Update bipolar webhook avatars if bipolar mode is active
|
||||
if globals.BIPOLAR_MODE:
|
||||
from bot.utils.bipolar_mode import update_webhook_avatars
|
||||
updated = await update_webhook_avatars()
|
||||
if debug:
|
||||
logger.info(f"Updated bipolar webhook avatars: {updated}")
|
||||
try:
|
||||
from utils.bipolar_mode import update_webhook_avatars
|
||||
updated = await update_webhook_avatars(globals.client)
|
||||
if debug:
|
||||
logger.info(f"Updated bipolar webhook avatars: {updated}")
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to update bipolar webhook avatars: {e}")
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user