mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-29 10:43:53 +00:00
doc: add usage of \n
This commit is contained in:
parent
1dd94410fd
commit
dca7a6dccb
@ -329,5 +329,5 @@ send_action "${CHAT[ID]}" "action"
|
||||
#### [Prev Create Bot](1_firstbot.md)
|
||||
#### [Next Advanced Usage](3_advanced.md)
|
||||
|
||||
#### $$VERSION$$ v1.2-dev2-65-ga9852ef
|
||||
#### $$VERSION$$ v1.2-dev2-70-g1dd9441
|
||||
|
||||
|
@ -106,7 +106,7 @@ echo -e "Your Message: ${test}\nbye!"
|
||||
#### message formatting and keyboards
|
||||
|
||||
The output of the script will be processed by 'send_messages', so you can not only send text, but also keyboards, files, locations and more.
|
||||
Each newline in the output will start an new message to the user, to insert line breaks in your message you must insert ' mynewlinestartshere ' instead of a newline..
|
||||
Each newline in the output will start an new message to the userr. To have line breaks in your message you must insert ' mynewlinestartshere ' or '\n' instead.
|
||||
|
||||
To open up a keyboard in an interactive script, print out the keyboard layout in the following way:
|
||||
```bash
|
||||
@ -134,9 +134,10 @@ echo "Text that will appear in chat? mykeyboardstartshere [ \"Yep, sure\" , \"No
|
||||
```
|
||||
Please note that you can either send a location or a venue, not both. To send a venue add the mytitlestartshere and the myaddressstartshere keywords.
|
||||
|
||||
New in v0.6: To insert a linebreak in your message you can insert ```mynewlinestartshere``` in your echo command:
|
||||
To insert a line break in your message you can insert ` mynewlinestartshere ` or `\n` in your echo command:
|
||||
```bash
|
||||
echo "Text that will appear in one message mynewlinestartshere with this text on a new line"
|
||||
echo "Other text message\nwith a newline" # \n instead of mynewlinestartshere
|
||||
```
|
||||
|
||||
New in v0.7: In case you must extend a message already containing a location, a file, a keyboard etc.,
|
||||
@ -298,5 +299,5 @@ Note: If you disable automatic retry, se above, you disable also connection prob
|
||||
#### [Prev Getting started](2_usage.md)
|
||||
#### [Next Expert Use](4_expert.md)
|
||||
|
||||
#### $$VERSION$$ v1.2-10-g10c104d
|
||||
#### $$VERSION$$ v1.2-dev2-70-g1dd9441
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
### Send, forward, delete messages
|
||||
|
||||
To insert line brakes in a message or caption you can place `\n` in the text.
|
||||
|
||||
##### send_action
|
||||
```send_action``` shows users what your bot is currently doing.
|
||||
|
||||
@ -1143,5 +1145,5 @@ The name of your bot is available as bash variable "$ME", there is no need to ca
|
||||
#### [Prev Best Practice](5_practice.md)
|
||||
#### [Next Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v1.2-dev2-15-g3496a21
|
||||
#### $$VERSION$$ v1.2-dev2-70-g1dd9441
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user