From b6dc3a0d93a44179cc5e79e197a2b1cab2610ae6 Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Mon, 17 Apr 2023 13:06:21 +0200 Subject: [PATCH] Update 3_advanced.md --- doc/3_advanced.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/3_advanced.md b/doc/3_advanced.md index f6fd6fa..a6fffc7 100644 --- a/doc/3_advanced.md +++ b/doc/3_advanced.md @@ -75,9 +75,10 @@ You must use the function `user_is_allowed` to check if a user has the capabilit ### Interactive Chats Interactive chats are short running scripts, reading user input and echo data to the user. -**Note**: Inmteractive chats are simple scripts, reading and writing from/to a pipe. It's **not possible** to use bashbot functions adn variables! +**Important**: Interactive chats are simple scripts reading/writing from/to a pipe. +**It's not possible to use bashbot functions and variables!** -user input sent as TEXT **->** script reads TEXT and print TEXT **->** Text sent to user with [simple formatting]() + user input as **TEXT** **|** script reads **TEXT** **|** script output sent to user [simple formatting]() 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' @@ -88,7 +89,7 @@ and then use `start_proc` function from your bot, it's possible to pass two argu *usage*: check_prog chat_id -**IMPORTANT:** Scripts must read user input from '$3' instead of stdin! +**Note:** Scripts must read user input from '$3' instead of stdin! ```bash #!/bin/bash