Tested Phase 1, fixed text channel blocking while in voice and implemented joining and leaving VC from Phase 2
This commit is contained in:
13
bot/bot.py
13
bot/bot.py
@@ -138,6 +138,19 @@ async def on_message(message):
|
||||
await handle_voice_command(message, cmd, args)
|
||||
return
|
||||
|
||||
# Block all text responses when voice session is active
|
||||
if globals.VOICE_SESSION_ACTIVE:
|
||||
# Queue the message for later processing (optional)
|
||||
if not hasattr(message, 'author') or message.author != globals.client.user:
|
||||
globals.TEXT_MESSAGE_QUEUE.append({
|
||||
'message': message,
|
||||
'timestamp': message.created_at,
|
||||
'channel_id': message.channel.id,
|
||||
'content': message.content
|
||||
})
|
||||
logger.debug(f"Message queued during voice session: {message.content[:50]}...")
|
||||
return # Don't process any messages during voice session
|
||||
|
||||
# Skip processing if a bipolar argument is in progress in this channel
|
||||
if not isinstance(message.channel, discord.DMChannel):
|
||||
from utils.bipolar_mode import is_argument_in_progress
|
||||
|
||||
Reference in New Issue
Block a user