mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 15:15:09 +00:00
Update 3_advanced.md
This commit is contained in:
parent
b6dc3a0d93
commit
5653582d68
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user