You are viewing a single comment's thread from:
RE: 🤖 TUTORIAL - Statistics Responder - Building bots With steem-js #8
Thanks for your tutorials, Sam. I was just wondering how to prevent the bot from commenting more than once per 20 seconds?
Thanks for your tutorials, Sam. I was just wondering how to prevent the bot from commenting more than once per 20 seconds?
hey @svosee you'll want to add a timeout so instead of sending the reply function instantly it will wait. The time value is in milliseconds.
Let me know if i can help with anything else
I guess I was making things too complicated because I was thinking you would have to build some kind of waitlist if you're mentioned like every few seconds. But I'll give the timeout a try. Thanks!
A waitlist would probably be a good idea, you could separate out the creating/sending of messages but I try to keep it as simple as possible for the tutorials. Shout if anything doesn't work or if I can help out further.
I would suggest using some sort of queue so that it is more robust and you have control.