Close

Rate limiting:

A project log for Control My Lights

Control My Lights using a website, Twitch chat, YouTube chat. controlmylights.net

edward-c-deaver-ivEdward C. Deaver, IV 10/16/2020 at 20:360 Comments

In order to reduce spam or potential bot manipulation, I implemented a rate limit on how quickly a user could submit a new color. This is done by a simple map (NodeJS) or dictionary structure (Python), and associating the last message time with a user. If that time is under the set timespan, the user is not allowed to set a color and their time value is not updated. If that time is greater than the allotted timespan, the user’s command is allowed and their time value is updated.   

Discussions