I'm using commands.AutoShardedBot and I get these error messages periodically. Nothing in the error is my code and the only thing I have done to shard the bot is to change commands.Bot to commands.AutoShardedBot as seen below in the minimal reproducible code.
2024-04-17 22:56:21,545:ERROR:discord.shard: Attempting a reconnect for shard ID 1 in 0.76s
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/discord/shard.py", line 180, in worker
await self.ws.poll_event()
File "/usr/local/lib/python3.10/site-packages/discord/gateway.py", line 632, in poll_event
raise ConnectionClosed(
discord.errors.ConnectionClosed: Shard ID 1 WebSocket closed with 1000
2024-04-17 23:14:59,106:ERROR:discord.shard: Attempting a reconnect for shard ID 2 in 0.67s
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/discord/shard.py", line 180, in worker
await self.ws.poll_event()
File "/usr/local/lib/python3.10/site-packages/discord/gateway.py", line 632, in poll_event
raise ConnectionClosed(
discord.errors.ConnectionClosed: Shard ID 2 WebSocket closed with 1000
Reproduction Steps
Start a commands.AutoShardedBot instance and let it run.
Summary
I'm using
commands.AutoShardedBot
and I get these error messages periodically. Nothing in the error is my code and the only thing I have done to shard the bot is to changecommands.Bot
tocommands.AutoShardedBot
as seen below in the minimal reproducible code.Reproduction Steps
Start a
commands.AutoShardedBot
instance and let it run.Minimal Reproducible Code
Expected Results
To not have constant shard reconnection/closed connection errors.
Actual Results
I'm getting the errors shown.
Intents
Shown in minimum reproducible code answer.
System Information
Docker Compose Container on Ubuntu Server Python 3.10 Pip Packages:
Checklist
Additional Context
No response