mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-02-05 11:58:24 +00:00
reference doc updates
This commit is contained in:
parent
a7769add6a
commit
d4f415f7d9
@ -74,12 +74,10 @@ See also [Text formating options](https://core.telegram.org/bots/api#formatting-
|
||||
----
|
||||
|
||||
##### delete_message
|
||||
If your Bot is admin of a Chat he can delete every message, if not he can delete only his messages.
|
||||
A bot can only delete messages if he is admin of a Chat, if not he can delete his own messages only.
|
||||
|
||||
*usage:* delete_message "${CHAT[ID]}" "${MESSAGE[ID]}"
|
||||
|
||||
*alias:* _del_message "${MESSAGE[ID]}"
|
||||
|
||||
See also [deleteMessage limitations](https://core.telegram.org/bots/api#deletemessage)
|
||||
|
||||
----
|
||||
@ -143,9 +141,13 @@ Note: since version 0.6 send_keyboard was changed to use native "JSON Array" not
|
||||
|
||||
*example:*
|
||||
```bash
|
||||
send_keyboard "${CHAT[ID]}" "Say yes or no" "[ \\"yes\" , \\"no\" ]""
|
||||
send_keyboard "${CHAT[ID]}" "Say yes or no" "[ \\"yes\\" ] , [ \\"no\\" ]"
|
||||
send_keyboard "${CHAT[ID]}" "Enter digit" "[ \\"1\\" , \\"2\\" , \\"3\\" ] , [ \\"4\\" , \\"5\\" , \\"6\\" ] , [ \\"7\\" , \\"8\\" , \\"9\\" ] , [ \\"0\\" ]"
|
||||
send_keyboard "${CHAT[ID]}" "Say yes or no" '[ "yes" , "no" ]' # in one row
|
||||
send_keyboard "${CHAT[ID]}" "Say yes or no" '[ "yes" ] , [ "no" ]' # 2 rows
|
||||
send_keyboard "${CHAT[ID]}" "Enter digit" '[ "1" , "2" , "3" ] , [ "4" , "5" , "6" ] , [ "7" , "8" , "9" ] , [ "0" ]'
|
||||
|
||||
_keyboard_yesno # see aliases
|
||||
_keyboard_numpad
|
||||
|
||||
```
|
||||
|
||||
##### remove_keyboard
|
||||
@ -190,6 +192,8 @@ send_inline_keyboard "${CHAT[ID]}" "" '[{"text":"b 1", url"":"u 1"}, {"text":"b
|
||||
----
|
||||
|
||||
### User Access Control
|
||||
The following basic user control functions are part of the Telegram API.
|
||||
More advanced API functions are currently not implemented in bashbot.
|
||||
|
||||
##### kick_chat_member
|
||||
If your Bot is a chat admin he can kick and ban a user.
|
||||
@ -223,6 +227,8 @@ fi
|
||||
|
||||
----
|
||||
|
||||
The following functions are bashbot only and not part of the Telegram API.
|
||||
|
||||
##### user_is_botadmin
|
||||
Return true (0) if user is admin of bot, user id if botadmin is read from file './botadmin'.
|
||||
|
||||
@ -302,7 +308,7 @@ answer_inline_multi "${iQUERY[ID]}" "
|
||||
"
|
||||
```
|
||||
|
||||
#### inline_query_compose
|
||||
##### inline_query_compose
|
||||
inline_query_compose composes one response element to to send back.
|
||||
|
||||
*usage:* inline_query_compose ID type args ....
|
||||
@ -452,6 +458,8 @@ Usually message is automatically forwarded in 'commands.sh', but you can forwar
|
||||
|
||||
*replaces:*' incproc
|
||||
|
||||
----
|
||||
|
||||
### jsshDB
|
||||
Since output generated by JSON.sh is so handy to use in bash, we use the format for a simple keys/value storage and providing
|
||||
fucntions to read and write JSON.sh style data from and to files.
|
||||
@ -695,7 +703,7 @@ Do not use them in bashbot.sh, modules and addons.
|
||||
|
||||
*alias for:* remove_keyboard "${CHAT[ID]}" ""
|
||||
|
||||
|
||||
----
|
||||
|
||||
### Helper functions
|
||||
|
||||
@ -804,11 +812,12 @@ killallproc "_${CHAT[ID]}"
|
||||
# kill all bot processes, including YOURSELF!
|
||||
killallproc
|
||||
```
|
||||
##### get_file
|
||||
*usage:* url="$(get_file "${CHAT[ID]}" "message")"
|
||||
|
||||
----
|
||||
|
||||
##### get_file
|
||||
*usage:* url="$(get_file "${CHAT[ID]}" "message")"
|
||||
|
||||
##### send_text
|
||||
*usage:* send_text "${CHAT[ID]}" "message"
|
||||
|
||||
@ -880,5 +889,5 @@ The name of your bot is availible as bash variable "$ME", there is no need to ca
|
||||
#### [Prev Best Practice](5_practice.md)
|
||||
#### [Next Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v0.94-dev2-2-gce60555
|
||||
#### $$VERSION$$ v0.94-dev2-3-ga7769ad
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user