From 5653582d6832fc70e5773bc53ac4996fe45fb4d2 Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Mon, 17 Apr 2023 13:20:03 +0200 Subject: [PATCH] Update 3_advanced.md --- doc/3_advanced.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/3_advanced.md b/doc/3_advanced.md index a6fffc7..02f8c6a 100644 --- a/doc/3_advanced.md +++ b/doc/3_advanced.md @@ -73,12 +73,13 @@ You must use the function `user_is_allowed` to check if a user has the capabilit **See also [Bashbot User Access Control functions](6_reference.md#User-Access-Control)** ### Interactive Chats -Interactive chats are short running scripts, reading user input and echo data to the user. +Interactive chats are simple Bash scripts, reading user input as TEXT and output TEXT to the user. -**Important**: Interactive chats are simple scripts reading/writing from/to a pipe. -**It's not possible to use bashbot functions and variables!** +**Important**: Interactive scripts run in a pipeline, it's **not possible** to use bashbot functions and variables! - user input as **TEXT** **|** script reads **TEXT** **|** script output sent to user [simple formatting]() +```bash +user input as TEXT | script reads TEXT | output sent to user as formated TEXT (see below) +``` To create a new interactive chat script copy `scripts/interactive.sh.clean` to e.g. `scripts/mynewinteractive.sh`, make it executable and then use `start_proc` function from your bot, it's possible to pass two arguments. You find more examples for interactive scripts in 'examples'