stefanleminh / ploot

A bot to help you with your team-building needs in PvP games!
MIT License
0 stars 1 forks source link

Feature/add qol lobby functionality #16

Closed stefanleminh closed 3 years ago

stefanleminh commented 3 years ago

This PR adds a few QoL Lobby functionalities, such as automatically adding/removing participants to the list of players upon entering/removing the lobby vc and lobby parsing. A timeout to the VC-moving has been added to not have an awkward pause once the rate limit has been reached.

stefanleminh commented 3 years ago

Good adjustmenst. I'm just wondering where the voiceStateUpdate is been used?

voiceStateUpdate is an event that gets emitted by the Discord API everytime something with Voice Channels happens and the code I've written listens to this event. We don't have to use it ourselves (similar to ready and message).

AndreasMReumschuessel commented 3 years ago

Ah understood, that's really handy. Will it make the sync delay obsolete?

stefanleminh commented 3 years ago

No, since the syncDelay was implemented to make the movement to the designated voice channels after doing =startmatch a bit more even. Usually it would do around 10 and you'd have to wait for a few seconds because the rate limit was reached. The sync delay was implemented to move users in a certain interval to avoid hitting the rate limit.