pitaya-bot icon indicating copy to clipboard operation
pitaya-bot copied to clipboard

Added Sleep function to bots

Open alexnum opened this issue 2 years ago • 0 comments

With the add of the new "Sleep" function, the bot can wait some specific time before going to the next message in the sequentialOperations, for that, we've added a new function "sleep" to the pitaya-bot (Currently, there is the "connect", "disconnect" and "reconnect" functions). The usage is pretty simple, just put a sleep function call like between sequentialOperations, and the bot will wait the time specified (5000ms in the example below) in the "timeout" property.

{
  "type": "function",
  "uri": "sleep",
  "timeout": 5000
}

alexnum avatar May 13 '22 22:05 alexnum