pycord
pycord copied to clipboard
Bot not switching to "ready" after reconnect.
Summary
After a reconnect to the gateway, bot.is_ready() will always return False.
Reproduction Steps
Create a bot that displays the ready state in his status.
Minimal Reproducible Code
bot = discord.Bot()
from discord.ext.tasks import loop
@bot.event
async def on_connect():
presence_manager.start()
@loop(seconds=300)
async def presence_manager():
if not bot.is_ready():
presence="Loading."
else:
presence="Ready."
game = discord.Game(presence)
await bot.change_presence(status=discord.Status.online, activity=game)
Expected Results
Display "Ready." in status after reconnecting.
Actual Results
Status stays "Loading." after reconnecting.
Intents
members
System Information
pycord 2.0.0b4 python3.9
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
No response
Presence most likely isn't updating, printing the result of is_ready would be a more reliable method to check.
I've just build this method to show it, there are other methods checking is_ready in my bot.
Switched sharding to 5 shards / proc, can't repro anymore.