Fix: Explicitly pass change_role_color=True when switching modes after bipolar argument
When an argument ends and a winner is determined, the bot now explicitly passes all mode change parameters (change_username, change_pfp, change_nicknames, change_role_color) to ensure the winner's role color is properly restored. - Evil Miku wins: Saves current color, switches to dark red (#D60004) - Regular Miku wins: Restores previously saved color (from before Evil Mode) This ensures the visual identity matches the active persona after arguments.
This commit is contained in:
@@ -934,14 +934,14 @@ async def run_argument(channel: discord.TextChannel, client, trigger_context: st
|
|||||||
# Record result in scoreboard with arbiter's reasoning
|
# Record result in scoreboard with arbiter's reasoning
|
||||||
scoreboard = record_argument_result(winner, exchange_count, judgment)
|
scoreboard = record_argument_result(winner, exchange_count, judgment)
|
||||||
|
|
||||||
# Switch to winner's mode
|
# Switch to winner's mode (including role color)
|
||||||
from utils.evil_mode import apply_evil_mode_changes, revert_evil_mode_changes
|
from utils.evil_mode import apply_evil_mode_changes, revert_evil_mode_changes
|
||||||
if winner == "evil":
|
if winner == "evil":
|
||||||
print("👿 Evil Miku won! Switching to Evil Mode...")
|
print("👿 Evil Miku won! Switching to Evil Mode...")
|
||||||
await apply_evil_mode_changes(client)
|
await apply_evil_mode_changes(client, change_username=True, change_pfp=True, change_nicknames=True, change_role_color=True)
|
||||||
else:
|
else:
|
||||||
print("💙 Hatsune Miku won! Switching to Normal Mode...")
|
print("💙 Hatsune Miku won! Switching to Normal Mode...")
|
||||||
await revert_evil_mode_changes(client)
|
await revert_evil_mode_changes(client, change_username=True, change_pfp=True, change_nicknames=True, change_role_color=True)
|
||||||
|
|
||||||
# Clean up argument conversation history
|
# Clean up argument conversation history
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user