How to display the current time in your bot's message or response

To show the current time in your bot message or response, please follow these steps:

We will make use of the script variables.

Step 0: enable developer mode

Step 1: create script variable named time:

function(callback, variables) {
  var today = new Date();

In the above code the function " today.toLocaleTimeString()" is used, which gives the user locale-specific time string.

Step 2: You can now use the above-created solution by using {{time}} in your bot. So if you want to use the as a chat message, bot response message, response connections, just use it like this:

Edit this page