pitaya-bot
pitaya-bot copied to clipboard
Added Sleep function to bots
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
}