This commit is contained in:
2025-11-21 20:19:23 -05:00
parent 2c9fa9a14c
commit ee89f394bd
3 changed files with 2489 additions and 200 deletions

489
bot.log
View File

@@ -832,3 +832,492 @@ discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
23:09:51 [INFO] discord.client: Cleaning up after 1 tasks.
23:09:51 [INFO] discord.client: All tasks finished cancelling.
23:09:51 [INFO] discord.client: Closing the event loop.
20:35:08 [DEBUG] asyncio: Using proactor: IocpProactor
20:35:08 [INFO] discord.client: logging in using static token
20:35:09 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
20:35:09 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-b-tg7r",{"micros":160181,"calls":["id_created",{"micros":372,"calls":[]},"session_lookup_time",{"micros":2533,"calls":[]},"session_lookup_finished",{"micros":11,"calls":[]},"discord-sessions-prd-2-112",{"micros":156542,"calls":["start_session",{"micros":154487,"calls":["discord-api-rpc-79555c9bc4-cxm9g",{"micros":59880,"calls":["get_user",{"micros":8062},"get_guilds",{"micros":4176},"send_scheduled_deletion_message",{"micros":29},"guild_join_requests",{"micros":515},"authorized_ip_coro",{"micros":19},"pending_payments",{"micros":65152},"apex_experiments",{"micros":15036},"user_activities",{"micros":30},"played_application_ids",{"micros":4},"linked_users",{"micros":4}]}]},"starting_guild_connect",{"micros":26,"calls":[]},"presence_started",{"micros":349,"calls":[]},"guilds_started",{"micros":85,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":1566,"calls":[]},"connect_finished",{"micros":1580,"calls":[]},"build_ready",{"micros":11,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}] (Session ID: 202012c56eb12049216f42ee0e930119).
20:35:11 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
20:35:11 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
20:35:11 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
20:35:11 [INFO] basharbot: Startup checks OK
20:35:11 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
20:35:19 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
20:35:19 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
20:35:19 [INFO] basharbot: Connecting to voice channel: the jews leaving israel on the secret railroad with harriet truman (guild 763932345400950865)
20:35:20 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 1/2)
20:35:20 [INFO] discord.voice_client: Connecting to voice...
20:35:20 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
20:35:20 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
20:35:20 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
20:35:20 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 1/2
20:35:20 [DEBUG] basharbot: Cleared lingering voice state for guild 763932345400950865 during cleanup
20:35:20 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
20:35:20 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
20:35:23 [DEBUG] basharbot: Detected lingering voice state without client for guild 763932345400950865; clearing before reconnect
20:35:23 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 2/2)
20:35:23 [INFO] discord.voice_client: Connecting to voice...
20:35:23 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
20:35:23 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
20:35:24 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
20:35:24 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 2/2
20:35:24 [DEBUG] basharbot: Cleared lingering voice state for guild 763932345400950865 during cleanup
20:35:24 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
20:35:24 [ERROR] basharbot: Voice connect retries exhausted (guild 763932345400950865): Shard ID None WebSocket closed with 4006
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 939, in connect_to_author_channel
vc = await connect_voice_with_retry(channel)
File "D:\7. Git\BasharBotV2\bot.py", line 494, in connect_voice_with_retry
raise last_exc
File "D:\7. Git\BasharBotV2\bot.py", line 433, in connect_voice_with_retry
await voice_client.connect(timeout=25.0, reconnect=False)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
20:35:45 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
20:35:45 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
20:35:45 [DEBUG] basharbot: Detected lingering voice state without client for guild 763932345400950865; clearing before reconnect
20:35:45 [INFO] basharbot: Connecting to voice channel: cock talk (guild 763932345400950865)
20:35:46 [INFO] basharbot: Attempting voice connect to cock talk (attempt 1/2)
20:35:46 [INFO] discord.voice_client: Connecting to voice...
20:35:46 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
20:35:46 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
20:35:46 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin21-5ab391d0.discord.media
20:35:47 [ERROR] basharbot: Voice connect raised list index out of range on attempt 1/2
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 433, in connect_voice_with_retry
await voice_client.connect(timeout=25.0, reconnect=False)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 945, in poll_event
await self.received_message(utils._from_json(msg.data))
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 862, in received_message
await self.initial_connection(data)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 916, in initial_connection
mode = modes[0]
IndexError: list index out of range
20:35:47 [DEBUG] basharbot: Cleared lingering voice state for guild 763932345400950865 during cleanup
20:35:47 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
20:35:48 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
20:35:51 [DEBUG] basharbot: Detected lingering voice state without client for guild 763932345400950865; clearing before reconnect
20:35:51 [INFO] basharbot: Attempting voice connect to cock talk (attempt 2/2)
20:35:51 [INFO] discord.voice_client: Connecting to voice...
20:35:51 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
20:35:51 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
20:35:51 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin21-5ab391d0.discord.media
20:35:52 [ERROR] basharbot: Voice connect raised list index out of range on attempt 2/2
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 433, in connect_voice_with_retry
await voice_client.connect(timeout=25.0, reconnect=False)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 945, in poll_event
await self.received_message(utils._from_json(msg.data))
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 862, in received_message
await self.initial_connection(data)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 916, in initial_connection
mode = modes[0]
IndexError: list index out of range
20:35:52 [DEBUG] basharbot: Cleared lingering voice state for guild 763932345400950865 during cleanup
20:35:53 [ERROR] basharbot: Voice connect retries exhausted (guild 763932345400950865): list index out of range
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 939, in connect_to_author_channel
vc = await connect_voice_with_retry(channel)
File "D:\7. Git\BasharBotV2\bot.py", line 494, in connect_voice_with_retry
raise last_exc
File "D:\7. Git\BasharBotV2\bot.py", line 433, in connect_voice_with_retry
await voice_client.connect(timeout=25.0, reconnect=False)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 945, in poll_event
await self.received_message(utils._from_json(msg.data))
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 862, in received_message
await self.initial_connection(data)
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 916, in initial_connection
mode = modes[0]
IndexError: list index out of range
20:35:53 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
20:36:20 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
20:36:24 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
20:36:47 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
20:36:52 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
20:49:06 [INFO] discord.client: Received signal to terminate bot and event loop.
20:49:06 [INFO] discord.client: Cleaning up tasks.
20:49:06 [INFO] discord.client: Cleaning up after 1 tasks.
20:49:06 [INFO] discord.client: All tasks finished cancelling.
20:49:06 [INFO] discord.client: Closing the event loop.
21:24:52 [DEBUG] asyncio: Using proactor: IocpProactor
21:24:52 [INFO] discord.client: logging in using static token
21:24:53 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
21:24:53 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-b-njr5",{"micros":156887,"calls":["id_created",{"micros":808,"calls":[]},"session_lookup_time",{"micros":2789,"calls":[]},"session_lookup_finished",{"micros":11,"calls":[]},"discord-sessions-prd-2-16",{"micros":152052,"calls":["start_session",{"micros":146200,"calls":["discord-api-rpc-bc696d744-5lflr",{"micros":68878,"calls":["get_user",{"micros":8011},"get_guilds",{"micros":4247},"send_scheduled_deletion_message",{"micros":19},"guild_join_requests",{"micros":3237},"authorized_ip_coro",{"micros":9},"pending_payments",{"micros":48403},"apex_experiments",{"micros":12357},"user_activities",{"micros":5},"played_application_ids",{"micros":3},"linked_users",{"micros":2}]}]},"starting_guild_connect",{"micros":34,"calls":[]},"presence_started",{"micros":319,"calls":[]},"guilds_started",{"micros":72,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":5400,"calls":[]},"connect_finished",{"micros":5407,"calls":[]},"build_ready",{"micros":17,"calls":[]},"clean_ready",{"micros":0,"calls":[]},"optimize_ready",{"micros":1,"calls":[]},"split_ready",{"micros":0,"calls":[]}]}]}] (Session ID: bc7880b1edae71481eed70f3bbbd4131).
21:24:55 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
21:24:55 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
21:24:55 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
21:24:55 [INFO] basharbot: Startup checks OK
21:24:55 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
21:25:07 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
21:25:07 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
21:25:07 [INFO] basharbot: Connecting to voice channel: the jews leaving israel on the secret railroad with harriet truman (guild 763932345400950865)
21:25:08 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 1/2)
21:25:08 [INFO] discord.voice_client: Connecting to voice...
21:25:08 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:25:08 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:25:08 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:25:08 [WARNING] basharbot: Ignored 4006 error during voice connect request (guild 763932345400950865)
21:25:08 [WARNING] basharbot: Voice connect returned but client not connected on attempt 1; cleaning up (guild 763932345400950865)
21:25:08 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:25:08 [DEBUG] basharbot: Forced voice disconnect to clear stale session (guild 763932345400950865)
21:25:08 [DEBUG] basharbot: Cleared lingering voice state post-disconnect for guild 763932345400950865
21:25:08 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 1/2
21:25:08 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:25:08 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:25:09 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
21:25:12 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 2/2)
21:25:12 [INFO] discord.voice_client: Connecting to voice...
21:25:12 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:25:12 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:25:12 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:25:12 [WARNING] basharbot: Ignored 4006 error during voice connect request (guild 763932345400950865)
21:25:12 [WARNING] basharbot: Voice connect returned but client not connected on attempt 2; cleaning up (guild 763932345400950865)
21:25:12 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:25:12 [DEBUG] basharbot: Forced voice disconnect to clear stale session (guild 763932345400950865)
21:25:12 [DEBUG] basharbot: Cleared lingering voice state post-disconnect for guild 763932345400950865
21:25:12 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 2/2
21:25:12 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:25:12 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:25:12 [ERROR] basharbot: Voice connect retries exhausted (guild 763932345400950865): Shard ID None WebSocket closed with 4006
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 943, in connect_to_author_channel
vc = await connect_voice_with_retry(channel)
File "D:\7. Git\BasharBotV2\bot.py", line 498, in connect_voice_with_retry
raise last_exc
File "D:\7. Git\BasharBotV2\bot.py", line 453, in connect_voice_with_retry
raise ConnectionClosed(None, shard_id=None, code=4006)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:26:08 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
21:26:12 [WARNING] discord.gateway: Shard ID None has stopped responding to the gateway. Closing and restarting.
21:27:16 [INFO] discord.client: Received signal to terminate bot and event loop.
21:27:16 [INFO] discord.client: Cleaning up tasks.
21:27:16 [INFO] discord.client: Cleaning up after 1 tasks.
21:27:16 [INFO] discord.client: All tasks finished cancelling.
21:27:16 [INFO] discord.client: Closing the event loop.
21:27:17 [DEBUG] asyncio: Using proactor: IocpProactor
21:27:17 [INFO] discord.client: logging in using static token
21:27:18 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
21:27:18 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-c-gmvv",{"micros":168011,"calls":["id_created",{"micros":430,"calls":[]},"session_lookup_time",{"micros":229,"calls":[]},"session_lookup_finished",{"micros":12,"calls":[]},"discord-sessions-prd-2-62",{"micros":165194,"calls":["start_session",{"micros":146747,"calls":["discord-api-rpc-bc696d744-rgcl8",{"micros":97881,"calls":["get_user",{"micros":11454},"get_guilds",{"micros":7170},"send_scheduled_deletion_message",{"micros":20},"guild_join_requests",{"micros":135},"authorized_ip_coro",{"micros":10},"pending_payments",{"micros":38287},"apex_experiments",{"micros":2174},"user_activities",{"micros":4},"played_application_ids",{"micros":2},"linked_users",{"micros":7}]}]},"starting_guild_connect",{"micros":33,"calls":[]},"presence_started",{"micros":291,"calls":[]},"guilds_started",{"micros":58,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":18044,"calls":[]},"connect_finished",{"micros":18052,"calls":[]},"build_ready",{"micros":10,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":0,"calls":[]}]}]}] (Session ID: d983511dd58f8cc17dcf35940449a443).
21:27:20 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
21:27:20 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
21:27:20 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
21:27:20 [INFO] basharbot: Startup checks OK
21:27:20 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
21:27:31 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
21:27:31 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
21:27:31 [INFO] basharbot: Connecting to voice channel: cock talk (guild 763932345400950865)
21:27:31 [INFO] basharbot: Attempting voice connect to cock talk (attempt 1/2)
21:27:31 [INFO] discord.voice_client: Connecting to voice...
21:27:31 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:27:31 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:27:32 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:27:33 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:27:34 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:27:34 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 2)
21:27:34 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:27:34 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:27:35 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:27:36 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:27:39 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:27:39 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 3)
21:27:39 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:27:39 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:27:40 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:27:41 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:27:46 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:27:46 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 4)
21:27:46 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:27:46 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:27:46 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:27:48 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:27:55 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:27:55 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 5)
21:27:55 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:27:55 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:27:55 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:27:56 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:28:05 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:28:05 [WARNING] basharbot: Voice connect returned but client not connected on attempt 1; cleaning up (guild 763932345400950865)
21:28:05 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:28:05 [DEBUG] basharbot: Forced voice disconnect to clear stale session (guild 763932345400950865)
21:28:05 [DEBUG] basharbot: Cleared lingering voice state post-disconnect for guild 763932345400950865
21:28:05 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 1/2
21:28:05 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:28:05 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:28:05 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:28:06 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
21:28:09 [INFO] basharbot: Attempting voice connect to cock talk (attempt 2/2)
21:28:09 [INFO] discord.voice_client: Connecting to voice...
21:28:09 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:28:09 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:28:09 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:28:10 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:28:11 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:28:11 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 2)
21:28:11 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:28:11 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:28:12 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:28:13 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:28:16 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:28:16 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 3)
21:28:16 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:28:16 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> cock talk (self_mute=False deaf=False)
21:28:17 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-sin02-ccf2d8f8.discord.media
21:28:18 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:28:20 [INFO] basharbot: Voice state update (guild 763932345400950865): cock talk -> None (self_mute=False deaf=False)
21:28:21 [INFO] discord.client: Received signal to terminate bot and event loop.
21:28:21 [INFO] discord.client: Cleaning up tasks.
21:28:21 [INFO] discord.client: Cleaning up after 2 tasks.
21:28:21 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 1179243554892165202 (Guild ID 763932345400950865)
21:28:21 [INFO] discord.client: All tasks finished cancelling.
21:28:21 [INFO] discord.client: Closing the event loop.
21:30:01 [DEBUG] asyncio: Using proactor: IocpProactor
21:30:01 [INFO] discord.client: logging in using static token
21:30:01 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
21:30:02 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-d-8dxb",{"micros":240300,"calls":["id_created",{"micros":565,"calls":[]},"session_lookup_time",{"micros":508,"calls":[]},"session_lookup_finished",{"micros":11,"calls":[]},"discord-sessions-prd-2-30",{"micros":237794,"calls":["start_session",{"micros":220166,"calls":["discord-api-rpc-bc696d744-wkmfx",{"micros":143149,"calls":["get_user",{"micros":15274},"get_guilds",{"micros":2954},"send_scheduled_deletion_message",{"micros":15},"guild_join_requests",{"micros":703},"authorized_ip_coro",{"micros":12},"pending_payments",{"micros":58757},"apex_experiments",{"micros":5650},"user_activities",{"micros":7},"played_application_ids",{"micros":3},"linked_users",{"micros":11}]}]},"starting_guild_connect",{"micros":31,"calls":[]},"presence_started",{"micros":266,"calls":[]},"guilds_started",{"micros":73,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":17231,"calls":[]},"connect_finished",{"micros":17240,"calls":[]},"build_ready",{"micros":15,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":0,"calls":[]}]}]}] (Session ID: b5bde3a3a79d7f6c5f740a1cedef3e65).
21:30:04 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
21:30:04 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
21:30:04 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
21:30:04 [INFO] basharbot: Startup checks OK
21:30:04 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
21:30:15 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
21:30:15 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
21:30:15 [INFO] basharbot: Connecting to voice channel: the jews leaving israel on the secret railroad with harriet truman (guild 763932345400950865)
21:30:15 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 1/5)
21:30:15 [ERROR] basharbot: Voice connect raised Connectable.connect() got an unexpected keyword argument 'self_deaf' on attempt 1/5
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 422, in connect_voice_with_retry
voice_client = await channel.connect(timeout=20.0, reconnect=False, self_deaf=True)
TypeError: Connectable.connect() got an unexpected keyword argument 'self_deaf'
21:30:16 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
21:30:19 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 2/5)
21:30:19 [ERROR] basharbot: Voice connect raised Connectable.connect() got an unexpected keyword argument 'self_deaf' on attempt 2/5
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 422, in connect_voice_with_retry
voice_client = await channel.connect(timeout=20.0, reconnect=False, self_deaf=True)
TypeError: Connectable.connect() got an unexpected keyword argument 'self_deaf'
21:30:19 [INFO] basharbot: Waiting 4.5s before retry 3 (guild 763932345400950865)
21:30:24 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 3/5)
21:30:24 [ERROR] basharbot: Voice connect raised Connectable.connect() got an unexpected keyword argument 'self_deaf' on attempt 3/5
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\bot.py", line 422, in connect_voice_with_retry
voice_client = await channel.connect(timeout=20.0, reconnect=False, self_deaf=True)
TypeError: Connectable.connect() got an unexpected keyword argument 'self_deaf'
21:30:24 [INFO] basharbot: Waiting 6.8s before retry 4 (guild 763932345400950865)
21:30:26 [INFO] discord.client: Received signal to terminate bot and event loop.
21:30:26 [INFO] discord.client: Cleaning up tasks.
21:30:26 [INFO] discord.client: Cleaning up after 2 tasks.
21:30:26 [INFO] discord.client: All tasks finished cancelling.
21:30:26 [INFO] discord.client: Closing the event loop.
21:30:45 [DEBUG] asyncio: Using proactor: IocpProactor
21:30:45 [INFO] discord.client: logging in using static token
21:30:45 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
21:30:46 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-c-pzhn",{"micros":787182,"calls":["id_created",{"micros":367,"calls":[]},"session_lookup_time",{"micros":215,"calls":[]},"session_lookup_finished",{"micros":13,"calls":[]},"discord-sessions-prd-2-146",{"micros":786309,"calls":["start_session",{"micros":769369,"calls":["discord-api-rpc-bc696d744-msmqd",{"micros":663295,"calls":["get_user",{"micros":74566},"get_guilds",{"micros":96964},"send_scheduled_deletion_message",{"micros":17},"guild_join_requests",{"micros":34355},"authorized_ip_coro",{"micros":11},"pending_payments",{"micros":65263},"apex_experiments",{"micros":20202},"user_activities",{"micros":5},"played_application_ids",{"micros":3},"linked_users",{"micros":2}]}]},"starting_guild_connect",{"micros":31,"calls":[]},"presence_started",{"micros":369,"calls":[]},"guilds_started",{"micros":65,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":16452,"calls":[]},"connect_finished",{"micros":16460,"calls":[]},"build_ready",{"micros":11,"calls":[]},"clean_ready",{"micros":1,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":0,"calls":[]}]}]}] (Session ID: a48ebb300c20317d1e2409f6f416c4ce).
21:30:48 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
21:30:48 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
21:30:48 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
21:30:48 [INFO] basharbot: Startup checks OK
21:30:48 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
21:30:55 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
21:30:55 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
21:30:55 [INFO] basharbot: Connecting to voice channel: the jews leaving israel on the secret railroad with harriet truman (guild 763932345400950865)
21:30:56 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 1/5)
21:30:56 [INFO] discord.voice_client: Connecting to voice...
21:30:56 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:30:56 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:30:56 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:30:56 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 1/5
21:30:56 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:30:56 [DEBUG] basharbot: Forced voice disconnect to clear stale session (guild 763932345400950865)
21:30:56 [DEBUG] basharbot: Cleared lingering voice state post-disconnect for guild 763932345400950865
21:30:56 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:30:57 [INFO] basharbot: Waiting 3.0s before retry 2 (guild 763932345400950865)
21:31:00 [DEBUG] basharbot: Detected lingering voice state without client for guild 763932345400950865; clearing before reconnect
21:31:00 [INFO] basharbot: Attempting voice connect to the jews leaving israel on the secret railroad with harriet truman (attempt 2/5)
21:31:00 [INFO] discord.voice_client: Connecting to voice...
21:31:00 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:31:00 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:31:00 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:31:00 [WARNING] basharbot: Voice connect failed with ConnectionClosed(code=4006, reason=) on attempt 2/5
21:31:00 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:31:00 [DEBUG] basharbot: Forced voice disconnect to clear stale session (guild 763932345400950865)
21:31:00 [DEBUG] basharbot: Cleared lingering voice state post-disconnect for guild 763932345400950865
21:31:00 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> None (self_mute=False deaf=False)
21:31:01 [INFO] basharbot: Waiting 4.5s before retry 3 (guild 763932345400950865)
21:31:02 [INFO] discord.client: Received signal to terminate bot and event loop.
21:31:02 [INFO] discord.client: Cleaning up tasks.
21:31:02 [INFO] discord.client: Cleaning up after 2 tasks.
21:31:02 [INFO] discord.client: All tasks finished cancelling.
21:31:02 [INFO] discord.client: Closing the event loop.
21:33:01 [DEBUG] asyncio: Using proactor: IocpProactor
21:33:01 [INFO] discord.client: logging in using static token
21:33:02 [INFO] discord.gateway: Shard ID None has sent the IDENTIFY payload.
21:33:02 [INFO] discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-arm-us-east1-b-9n44",{"micros":641874,"calls":["id_created",{"micros":1129,"calls":[]},"session_lookup_time",{"micros":291,"calls":[]},"session_lookup_finished",{"micros":16,"calls":[]},"discord-sessions-prd-2-199",{"micros":640088,"calls":["start_session",{"micros":628893,"calls":["discord-api-rpc-bc696d744-sq26z",{"micros":429044,"calls":["get_user",{"micros":42740},"get_guilds",{"micros":25004},"send_scheduled_deletion_message",{"micros":14},"guild_join_requests",{"micros":2052},"authorized_ip_coro",{"micros":12},"pending_payments",{"micros":78652},"apex_experiments",{"micros":38280},"user_activities",{"micros":7},"played_application_ids",{"micros":4},"linked_users",{"micros":5}]}]},"starting_guild_connect",{"micros":26,"calls":[]},"presence_started",{"micros":357,"calls":[]},"guilds_started",{"micros":62,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":10728,"calls":[]},"connect_finished",{"micros":10737,"calls":[]},"build_ready",{"micros":11,"calls":[]},"clean_ready",{"micros":0,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}] (Session ID: db2898d733b46312409fcbf276f4e305).
21:33:04 [INFO] basharbot: Logged in as Bashar Al-Assad Version 2#4174 (id=1014194017346531419)
21:33:04 [DEBUG] basharbot: ffmpeg found: C:\ProgramData\chocolatey\bin\ffmpeg.EXE
21:33:04 [WARNING] basharbot: Opus library not found; install opuslib/opus-tools if voice receive misbehaves.
21:33:04 [INFO] basharbot: Startup checks OK
21:33:04 [INFO] basharbot: Hotword listening: ENABLED (sinks available and HOTWORD_ENABLED=True)
21:33:08 [DEBUG] basharbot: Wake word detected. Raw='hey bashar join' | action='join' | args=''
21:33:08 [DEBUG] basharbot: Connect requested by riggs0 (Riggs0) in guild 763932345400950865
21:33:08 [INFO] basharbot: Connecting to voice channel: the jews leaving israel on the secret railroad with harriet truman (guild 763932345400950865)
21:33:08 [INFO] discord.voice_client: Connecting to voice...
21:33:08 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 1)
21:33:08 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:33:08 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:33:08 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:33:09 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:09 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 2)
21:33:09 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:33:09 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:33:09 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:33:09 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:33:12 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:12 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 3)
21:33:13 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:33:13 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:33:13 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:33:13 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:33:18 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:18 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 4)
21:33:18 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:33:18 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:33:18 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:33:18 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:33:25 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:25 [INFO] discord.voice_client: Starting voice handshake... (connection attempt 5)
21:33:25 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:33:25 [INFO] basharbot: Voice state update (guild 763932345400950865): None -> the jews leaving israel on the secret railroad with harriet truman (self_mute=False deaf=False)
21:33:26 [INFO] discord.voice_client: Voice handshake complete. Endpoint found c-ord06-7f5d4b52.discord.media
21:33:26 [ERROR] discord.voice_client: Failed to connect to voice... Retrying...
Traceback (most recent call last):
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 404, in connect
self.ws = await self.connect_websocket()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\voice_client.py", line 375, in connect_websocket
await ws.poll_event()
File "D:\7. Git\BasharBotV2\.venv\lib\site-packages\discord\gateway.py", line 955, in poll_event
raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code)
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4006
21:33:35 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:35 [INFO] basharbot: Voice state update (guild 763932345400950865): the jews leaving israel on the secret railroad with harriet truman -> None (self_mute=False deaf=False)
21:33:35 [ERROR] basharbot: Voice connect returned but not connected (guild 763932345400950865)
21:33:37 [INFO] basharbot: Joined voice channel for guild 763932345400950865
21:33:37 [DEBUG] basharbot: Cannot start listener without an active voice client (guild 763932345400950865)
21:33:39 [INFO] discord.client: Received signal to terminate bot and event loop.
21:33:39 [INFO] discord.client: Cleaning up tasks.
21:33:39 [INFO] discord.client: Cleaning up after 1 tasks.
21:33:39 [INFO] discord.voice_client: The voice handshake is being terminated for Channel ID 906023282615144508 (Guild ID 763932345400950865)
21:33:39 [INFO] discord.client: All tasks finished cancelling.
21:33:39 [INFO] discord.client: Closing the event loop.

118
bot.py
View File

@@ -389,109 +389,35 @@ async def _get_active_voice_client(guild: Optional[discord.Guild]) -> Optional[d
return voice_client
async def connect_voice_with_retry(channel: discord.abc.Connectable, *, retries: int = 2, delay: float = 3.0) -> discord.VoiceClient:
async def connect_voice_with_retry(channel: discord.abc.Connectable) -> discord.VoiceClient:
"""
Robust voice connect helper that mitigates transient 4006 invalid session errors
by aggressively clearing stale session_id to force fresh handshakes.
Standard, simplified voice connection helper.
Uses standard Discord library methods without custom retry loops to avoid state conflicts.
"""
last_exc: Optional[Exception] = None
guild: Optional[discord.Guild] = getattr(channel, "guild", None)
if guild is None:
raise RuntimeError("Voice channel without guild cannot establish a connection.")
# Always start with a clean slate to avoid 4006 stale-session loops
await _force_cleanup_voice_client(guild)
# 1. Cleanup existing client if present
try:
old_vc = getattr(guild, "voice_client", None)
if old_vc:
if old_vc.channel == channel and old_vc.is_connected():
return old_vc
await old_vc.disconnect(force=True)
await asyncio.sleep(0.5)
for attempt in range(1, retries + 1):
existing_vc: Optional[discord.VoiceClient] = await _get_active_voice_client(guild)
if existing_vc and existing_vc.channel == channel and existing_vc.is_connected():
logger.info("Re-using existing voice connection to %s (attempt %d/%d)", channel, attempt, retries)
return existing_vc
try:
logger.info("Attempting voice connect to %s (attempt %d/%d)", channel, attempt, retries)
# WORKAROUND for persistent 4006: Manually create VoiceClient and patch it to prevent session resume
from discord import VoiceClient as VoiceClientClass
state = guild._state
key_id = guild.id
# Remove any existing voice client to force fresh connection
state._remove_voice_client(key_id)
# Create new voice client
voice_client = VoiceClientClass(state._get_client(), channel)
# Force clear any stale session_id that might be cached
if hasattr(voice_client, 'session_id'):
voice_client.session_id = None
# Register it
state._add_voice_client(key_id, voice_client)
# Now connect with no reconnect to avoid resume attempts
try:
await voice_client.connect(timeout=25.0, reconnect=False)
except Exception:
# If connection fails, clean up the registered client
state._remove_voice_client(key_id)
raise
vc = voice_client
# Ensure we are self-undeafened so we can receive audio
try:
await channel.guild.change_voice_state(channel=channel, self_mute=False, self_deaf=False)
except Exception as change_err:
logger.debug("Unable to explicitly set voice state: %s", change_err)
if not vc.is_connected():
logger.warning("Voice connect returned but client not connected on attempt %d; cleaning up (guild %s)", attempt, guild.id)
await _force_cleanup_voice_client(guild)
raise ConnectionClosed(None, shard_id=None, code=4006)
logger.info("Voice connect succeeded on attempt %d (%s)", attempt, channel)
return vc
except ConnectionClosed as e:
last_exc = e
logger.warning(
"Voice connect failed with ConnectionClosed(code=%s, reason=%s) on attempt %d/%d",
getattr(e, "code", None),
getattr(e, "reason", None),
attempt,
retries,
)
await _force_cleanup_voice_client(guild)
except ClientException as e:
last_exc = e
logger.warning(
"Voice connect failed with ClientException('%s') on attempt %d/%d",
e,
attempt,
retries,
)
if "Already connected to a voice channel" in str(e):
existing_vc = await _get_active_voice_client(guild)
if existing_vc and existing_vc.channel == channel and existing_vc.is_connected():
logger.info("Detected active voice session despite ClientException; re-using existing client on guild %s", guild.id)
return existing_vc
await _force_cleanup_voice_client(guild)
except Exception as e:
last_exc = e
logger.exception("Voice connect raised %s on attempt %d/%d", e, attempt, retries)
await _force_cleanup_voice_client(guild)
logger.debug("Error cleaning up old voice client: %s", e)
# Reset voice state and wait before retrying
# 2. Connect using standard library method
# Note: reconnect=True is the default and correct behavior for handling
# transient session errors (like 4006) internally by the library.
try:
await guild.change_voice_state(channel=None, self_mute=False, self_deaf=False)
await asyncio.sleep(0.5)
except Exception as reset_err:
logger.debug("Failed to reset guild voice state: %s", reset_err)
if attempt < retries:
wait_time = delay * (1.5 ** (attempt - 1))
logger.info("Waiting %.1fs before retry %d (guild %s)", wait_time, attempt + 1, guild.id)
await asyncio.sleep(wait_time)
assert last_exc is not None
raise last_exc
voice_client = await channel.connect(timeout=20.0, reconnect=True)
return voice_client
except Exception as e:
logger.warning("Standard connect failed: %s", e)
raise
@dataclass
class QueueItem:
@@ -499,7 +425,7 @@ class QueueItem:
source_factory: Callable[[], discord.AudioSource]
announce: Optional[str] = None
if HAS_SINKS:
class HotwordStreamSink(sinks.Sink):
def __init__(
self,
@@ -612,6 +538,10 @@ class HotwordStreamSink(sinks.Sink):
future.add_done_callback(_done_callback)
self.pending_tasks[user_id] = future
else:
class HotwordStreamSink: # type: ignore
def __init__(self, *args, **kwargs):
pass
@dataclass

1870
transcript.log Normal file

File diff suppressed because it is too large Load Diff