cordless icon indicating copy to clipboard operation
cordless copied to clipboard

Add sharding support

Open PrivateGER opened this issue 4 years ago • 4 comments

How have you installed cordless

  • [X] Arch User Repository
  • [ ] Snap
  • [ ] scoop
  • [ ] brew
  • [ ] go get

What happened

Attempting to log in as a bot with a bot that is part of more than 2000 servers doesn't work. The websocket is closed with the "Sharding required" message.

How do you reproduce this bug

Log in as a bot that is part of 2k+ servers.

Error output

websocket: close 4011: Sharding required.

How to fix

The only way to solve this problem is to implement sharding.

PrivateGER avatar May 22 '20 18:05 PrivateGER

I actually thought discordgo already supports sharding. Maybe this just needs to be toggled.

Bios-Marcel avatar Jun 25 '20 16:06 Bios-Marcel

Appears there's no documentation about how the sharding exactly works with discordgo. Either way I don't want to implement this myself, as I have no way of testing this. I do not own any bots.

Bios-Marcel avatar Jun 26 '20 18:06 Bios-Marcel

I found this, it might be a simple dependency https://github.com/jonas747/dshardmanager

Starwort avatar Jun 27 '20 17:06 Starwort

We'd need integration into https://github.com/Bios-Marcel/discordgo

Bios-Marcel avatar Jun 27 '20 17:06 Bios-Marcel