2019-04-15 09:49:13 +00:00
|
|
|
## Bashbot functions reference
|
|
|
|
|
|
|
|
### Send, forward, delete Messages
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_action
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_normal_message
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_markdown_message
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### send_html_message
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### forward
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_message
|
2019-04-15 12:17:18 +00:00
|
|
|
Send Message must (only) used to process the output of interactive chats and background jobs.
|
|
|
|
**For your commands I reccommend the more dedicated send_xxx_message() functions above.**
|
2019-04-15 10:52:38 +00:00
|
|
|
|
|
|
|
*usage:*
|
|
|
|
|
2019-04-15 12:17:18 +00:00
|
|
|
*example:* - see [Usage](2_usage.md#send_message) and [Advanced Usage](3_advanced.md#Interactive-Chats)
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### delete_message
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### answer_inline_query
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
### File, Location, Venu, keyboards
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### get_file
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_file
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_location
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### send_venue
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_keyboard
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### remove_keyboard
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
### Manage users
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### kick_chat_member
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### unban_chat_member
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### leave_chat
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### user_is_creator
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### user_is_admin
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### user_is_botadmin
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### user_is_allowed
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
### Interactive and backgound jobs
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### startproc
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### checkproc
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### killproc
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### background
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
|
|
|
|
|
|
|
##### checkback
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### killback
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
*example:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
### Bashbot internal
|
2019-04-15 12:17:18 +00:00
|
|
|
These functions are for internal use only and must not used in your bot commands.
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### send_text
|
|
|
|
*usage:*
|
|
|
|
|
2019-04-15 09:49:13 +00:00
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### JsonDecode
|
|
|
|
*usage:*
|
|
|
|
|
|
|
|
##### JsonGetString
|
|
|
|
*usage:*
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### JsonGetValue
|
|
|
|
*usage:*
|
|
|
|
|
2019-04-15 09:49:13 +00:00
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### get_chat_member_status
|
|
|
|
*usage:*
|
|
|
|
|
2019-04-15 09:49:13 +00:00
|
|
|
----
|
|
|
|
|
2019-04-15 10:52:38 +00:00
|
|
|
##### process_client
|
2019-04-15 12:17:18 +00:00
|
|
|
Every Message sent to your Bot is processd by this function. It parse the send JSON and assign the found Values to bash variables.
|
2019-04-15 10:52:38 +00:00
|
|
|
|
|
|
|
##### process_updates
|
2019-04-15 12:17:18 +00:00
|
|
|
If new updates are availible, this functions gets the JSON from Telegram and dispatch it.
|
2019-04-15 09:49:13 +00:00
|
|
|
|
|
|
|
----
|
2019-04-15 10:52:38 +00:00
|
|
|
##### getBotName
|
2019-04-15 12:17:18 +00:00
|
|
|
The name of your bot is availible as bash variable "$ME", there is no need to call this function if Bot is running.
|
2019-04-15 10:52:38 +00:00
|
|
|
|
2019-04-15 12:17:18 +00:00
|
|
|
*usage:* ME="$(getBotNiname)"
|
2019-04-15 10:52:38 +00:00
|
|
|
|
|
|
|
##### inproc
|
2019-04-15 12:17:18 +00:00
|
|
|
Send Input from Telegram to waiting Interactive Chat.
|
2019-04-15 09:49:13 +00:00
|
|
|
|
2019-04-15 12:17:18 +00:00
|
|
|
#### $$VERSION$$ v0.6-rc1-7-g14eb352
|
2019-04-15 09:49:13 +00:00
|
|
|
|