I think a mutex is the thing we should probably use there. There might be some race conditions that occur here because of modifying the global variable ( author_msg_times).
DISCORD PYTHON TEXT SPAMMER CODE
I am not sure why there is a sleep loop at the bottom.Īnyway, I think the following code will do what you'd like it to. If i find out its being using for toxic reasons I'll remove it or if discord asks me too. Discord really needs to work on their anti-spam, so look at this as almost a tool for Discord to improve with.
![discord python text spammer discord python text spammer](https://assets.digitalocean.com/articles/node_discord_bot/step1b.png)