/** * Forward all messages to a Telegram user. */ state Forward { // Consume the input so the answer is always evaluated. case input goto Forward; // Always invoke the function to forward the message. answer checkForward(); function checkForward() { // Replace 12345 with your user id. You can get your user id by querying all 'speaker' objects from the bot's Knowledge page. // The bot must be connected to a Telegram account to be able to send messages. // You must have already started a chat with the bot to receive messages. Telegram.sendMessage("@" + speaker.username + ": " + sentence.toString(), "12345"); } }