There are sleep functions. Does this happen after running the bot multiple times in the same client? For example you run it for a bit, turn it off, start it up later, etc. I've noticed before that when doing that sometimes when you run it again the client actually seems to run two instances of the script causing it to perform the same actions in succession very quickly. I'll take a look into the issue tomorrow after class. it's 2:30am for me so I'm headed to bed right now.