tuxinal / impostorCord

A discord bot plugin for Impostor
MIT License
18 stars 3 forks source link

Long delay for unmuting #8

Open flrvt opened 3 years ago

flrvt commented 3 years ago

Hi, yesterday I tried the plugin with a party of 10 and I got everything running.

Muting went as expected, here the timing is also less important I think. However, after the button was pressed or a body was reported, it could take up to 5 seconds and longer for everyone to be unmuted.

Is this normal behavior? What things affect this delay, and can it be shortened? Perhaps this is due my server, which has not that many resources allocated to docker?

Phoenix616 commented 3 years ago

Pretty sure this is due to discord's rate limiting on bot API calls. The standalone AutoMuteUs bot built a library to work around this by spreading API calls out over multiple bot instances. Might be worth integrating that or some other mechanism like it (or adding compatibility for already used AutoMuteUs bots?)

tuxinal commented 3 years ago

Hi, sorry for the late response it took me a while to gather a group to test this with and to be honest I didn't notice that much of a delay or maybe our group was too small and the bot took care of that quickly enough.

its probably caused by discord's rate limiting stuff as @Phoenix616 said

either ways I don't think i can do much to improve its speed, its already way faster compared to the older versions thanks to @Mr-VIT's contributions

caiosm1005 commented 3 years ago

Hey admins, I also made a AmongUs mute bot back then and faced that exact same problem. Things started to get ugly once we had 6+ users in the same audio channel.

I managed to overcome this by toggling the audio channel to Push-to-talk mode, which is just one command and does not hit Discord's API request rate limit.

Just an idea for you to consider.