Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upon_shard_ready(shard_id) Not firing. #2541
Comments
|
I am having a similar issue, with same context as that one. However, after looking at changelogs of discord.py 1.3, I saw changes to those two events, so I tried without PR #2504, and everything was working fine. |
|
I actually have attempted both also on a bare bones test bed on a new venv with a fresh install of d.py: and Both still fail to fire for on_shard_ready() and on_ready() is being fired still. (Tested the events seperately) |
|
Just a quick note that your second example contains your bot token *.* |
|
was regenerated before being sent and i editied it with a link that didnt directly show it, good catch tho |
Thought I'd reply. TestsWith
With
These all seemed to have a correlation of not ever receiving the guilds before
So, I decided to look at where ConclusionGuilds are only added to Feel free to correct me on this. |
|
After some more testing and with the new commit it seems that on_shard_ready() is firing reliably for large bots that need sharding which is fine for what I need now, altho makes testing on a one guild test bot impossible to use on_shard_ready() but that can be solved by just using a basic count system I guess. |
Summary
on_shard_ready(shard_id) - This function is not firing when it should, it seems to only fire for some bot tokens and not others. on_ready() however, is firing reliably every time instead of on_shard_ready(shard_id)
Context:
Reproduction Steps
Call AutoShardedClient. I used this inside of class see Here for the full paste of that class.
Run the bot.
see code block Here Note: Bot object is the Client object still.
Expected Results
You would expect on_shard_ready(shard_id) to fire once a shard is ready.
e.g.
[Client Running] - Shard: [0] [Online] - Ping: 101ms | Test bot (572022204243012608)
[Client Running] - Shard: [1] [Online] - Ping: 101ms | Test bot (572022204243012608)
Actual Results
on_shard_ready(shard_id) does not fire at all, instead on_ready() when attempted fires at every shard connection.
Console Log:
[20/01/27 | 19:05:34] Generated Client! shards: 1
[20/01/27 | 19:05:34] Client Initialised!
Please Enter your bot token:
[20/01/27 | 19:05:37] Starting Bot...
Checklist
System Information