Periodic execution of function

ereinion

Member
Is there any way to have a chatbot execute a function, say every 5 minutes or so, while also having it monitoring chat and possibly execute other functions based on what's happening there?
 

Crowther

Active member
Is there any way to have a chatbot execute a function, say every 5 minutes or so, while also having it monitoring chat and possibly execute other functions based on what's happening there?
I failed to notice this post from last month. If your main function setups up the chatbotScript preference, but doesn't return. It can loop doing stuff now and then. When there's a chat, your listener function is called in a different thread. Synchronization is a problem.
 

Pazleysox

Member
Is there any way to have a chatbot execute a function, say every 5 minutes or so, while also having it monitoring chat and possibly execute other functions based on what's happening there?

I figured out a way to do this. My chatbot ran a function I believe every 30 seconds to check for people WL'ing in and out. The timing can easily be changed.

If you are still looking for a way to do this, let me know, I can share the code with you.
 
Top