Webhook pfp updates properly now
This commit is contained in:
@@ -440,6 +440,13 @@ class ProfilePictureManager:
|
|||||||
if dominant_color:
|
if dominant_color:
|
||||||
await self._update_role_colors(dominant_color, debug=debug)
|
await self._update_role_colors(dominant_color, debug=debug)
|
||||||
|
|
||||||
|
# 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}")
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
except discord.HTTPException as e:
|
except discord.HTTPException as e:
|
||||||
@@ -535,6 +542,15 @@ class ProfilePictureManager:
|
|||||||
if dominant_color:
|
if dominant_color:
|
||||||
await self._update_role_colors(dominant_color, debug=debug)
|
await self._update_role_colors(dominant_color, debug=debug)
|
||||||
|
|
||||||
|
# Step 8: Update bipolar webhook avatars if bipolar mode is active
|
||||||
|
if globals.BIPOLAR_MODE:
|
||||||
|
try:
|
||||||
|
from utils.bipolar_mode import update_webhook_avatars
|
||||||
|
await update_webhook_avatars(globals.client)
|
||||||
|
logger.debug("Updated bipolar webhook avatars after profile picture change")
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f"Failed to update bipolar webhook avatars: {e}")
|
||||||
|
|
||||||
except discord.HTTPException as e:
|
except discord.HTTPException as e:
|
||||||
result["error"] = f"Discord API error: {e}"
|
result["error"] = f"Discord API error: {e}"
|
||||||
logger.warning(f"Failed to update Discord avatar: {e}")
|
logger.warning(f"Failed to update Discord avatar: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user