From d1a6532879e243ab3fcfbff095d5b015042b7b06 Mon Sep 17 00:00:00 2001
From: Daniil Gentili botfather
.
Type whatever name you want for your bot.
@botfather replies with Good. Now let's choose a username for your
-bot. It must end in
bot. Like this, for example: TetrisBot or
+bot. It must end in bot. Like this, for example: TetrisBot or
tetris_bot.
Type whatever username you want for your bot, minimum 5 characters,
and must end with bot
. For example: telesample_bot
$MESSAGE
: Incoming messages$MESSAGE[ID]
: ID of incoming message$CAPTION
: Captions$USER
: This array contains the First name, last name, username and user id of the sender of the current message.
@@ -127,6 +129,26 @@ Then start editing the commands.
$CHAT
: This array contains the First name, last name, username, title and user id of the chat of the current message.
+
+${CHAT[ID]}
: Chat id${CHAT[FIRST_NAME]}
: Chat's first name${CHAT[LAST_NAME]}
: Chat's last name${CHAT[USERNAME]}
: Username${CHAT[TITLE]}
: Title${CHAT[TYPE]}
: Type${CHAT[ALL_MEMBERS_ARE_ADMINISTRATORS]}
: All members are administrators (true if true)$URLS
: This array contains documents, audio files, stickers, voice recordings and stickers stored in the form of URLs.
To send messages use the send_message
function:
send_message "${USER[ID]}" "lol"
+send_message "${CHAT[ID]}" "lol"
To send html or markdown put the following strings before the text, depending on the parsing mode you want to enable:
-send_message "${USER[ID]}" "markdown_parse_mode lol *bold*"
+send_message "${CHAT[ID]}" "markdown_parse_mode lol *bold*"
-send_message "${USER[ID]}" "html_parse_mode lol <b>bold</b>"
+send_message "${CHAT[ID]}" "html_parse_mode lol <b>bold</b>"
This function also allows a third parameter that disables additional function parsing (for safety use this when reprinting user input):
-send_message "${USER[ID]}" "lol" "safe"
+send_message "${CHAT[ID]}" "lol" "safe"
To send images, videos, voice files, photos ecc use the send_photo
function (remember to change the safety Regex @ line 14 of command.sh to allow sending files only from certain directories):
-send_file "${USER[ID]}" "/home/user/doge.jpg" "Lool"
+send_file "${CHAT[ID]}" "/home/user/doge.jpg" "Lool"
To send custom keyboards use the send_keyboard
function:
-send_keyboard "${USER[ID]}" "Text that will appear in chat?" "Yep" "No"
+send_keyboard "${CHAT[ID]}" "Text that will appear in chat?" "Yep" "No"
To send locations use the send_location
function:
-send_location "${USER[ID]}" "Latitude" "Longitude"
+send_location "${CHAT[ID]}" "Latitude" "Longitude"
To send venues use the send_venue
function:
-send_venue "${USER[ID]}" "Latitude" "Longitude" "Title" "Address" "optional foursquare id"
+send_venue "${CHAT[ID]}" "Latitude" "Longitude" "Title" "Address" "optional foursquare id"
To forward messages use the forward
function:
-forward "${USER[ID]}" "from_chat_id" "message_id"
+forward "${CHAT[ID]}" "from_chat_id" "message_id"
To send a chat action use the send_action
function.
Allowed values: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for locations.
-send_action "${USER[ID]}" "action"
+send_action "${CHAT[ID]}" "action"
To create interactive chats, write (or edit the question script) a normal bash (or C or python) script, chmod +x it and then change the argument of the startproc function to match the command you usually use to start the script.
diff --git a/params.json b/params.json
index b9952ac..ff8f988 100644
--- a/params.json
+++ b/params.json
@@ -1,6 +1,6 @@
{
"name": "Telegram-bot-bash",
"tagline": "Telegram bot written in bash",
- "body": "#bashbot\r\nA Telegram bot written in bash.\r\n\r\nDepends on [tmux](http://github.com/tmux/tmux).\r\nUses [JSON.sh](http://github.com/dominictarr/JSON.sh).\r\n\r\nReleased to the public domain wherever applicable.\r\nElsewhere, consider it released under the [WTFPLv2](http://www.wtfpl.net/txt/copying/).\r\n\r\n\r\n## Instructions\r\n### Create your first bot\r\n\r\n1. Message @botfather https://telegram.me/botfather with the following\r\ntext: `/newbot`\r\n If you don't know how to message by username, click the search\r\nfield on your Telegram app and type `@botfather`, you should be able\r\nto initiate a conversation. Be careful not to send it to the wrong\r\ncontact, because some users has similar usernames to `botfather`.\r\n\r\n ![botfather initial conversation](http://i.imgur.com/aI26ixR.png)\r\n\r\n2. @botfather replies with `Alright, a new bot. How are we going to\r\ncall it? Please choose a name for your bot.`\r\n\r\n3. Type whatever name you want for your bot.\r\n\r\n4. @botfather replies with `Good. Now let's choose a username for your\r\nbot. It must end in `bot`. Like this, for example: TetrisBot or\r\ntetris_bot.`\r\n\r\n5. Type whatever username you want for your bot, minimum 5 characters,\r\nand must end with `bot`. For example: `telesample_bot`\r\n\r\n6. @botfather replies with:\r\n\r\n Done! Congratulations on your new bot. You will find it at\r\ntelegram.me/telesample_bot. You can now add a description, about\r\nsection and profile picture for your bot, see /help for a list of\r\ncommands.\r\n\r\n Use this token to access the HTTP API:\r\n 123456789:AAG90e14-0f8-40183D-18491dDE\r\n\r\n For a description of the Bot API, see this page:\r\nhttps://core.telegram.org/bots/api\r\n\r\n7. Note down the 'token' mentioned above.\r\n\r\n8. Type `/setprivacy` to @botfather.\r\n\r\n ![botfather later conversation](http://i.imgur.com/tWDVvh4.png)\r\n\r\n9. @botfather replies with `Choose a bot to change group messages settings.`\r\n\r\n10. Type `@telesample_bot` (change to the username you set at step 5\r\nabove, but start it with `@`)\r\n\r\n11. @botfather replies with\r\n\r\n 'Enable' - your bot will only receive messages that either start\r\nwith the '/' symbol or mention the bot by username.\r\n 'Disable' - your bot will receive all messages that people send to groups.\r\n Current status is: ENABLED\r\n\r\n12. Type `Disable` to let your bot receive all messages sent to a\r\ngroup. This step is up to you actually.\r\n\r\n13. @botfather replies with `Success! The new status is: DISABLED. /help`\r\n\r\n### Install bashbot\r\nClone the repository:\r\n```\r\ngit clone --recursive https://github.com/topkecleon/telegram-bot-bash\r\n```\r\n\r\nCreate a file called token and paste the token in there.\r\nThen start editing the commands.\r\n\r\n### Receive data\r\nYou can read incoming data using the following variables:\r\n\r\n* ```$MESSAGE```: Incoming messages\r\n* ```$CAPTION```: Captions\r\n* ```$USER```: This array contains the First name, last name, username and user id of the sender of the current message.\r\n * ```${USER[ID]}```: User id\r\n * ```${USER[FIRST_NAME]}```: User's first name\r\n * ```${USER[LAST_NAME]}```: User's last name\r\n * ```${USER[USERNAME]}```: Username\r\n* ```$URLS```: This array contains documents, audio files, stickers, voice recordings and stickers stored in the form of URLs.\r\n * ```${URLS[AUDIO]}```: Audio files\r\n * ```${URLS[VIDEO]}```: Videos\r\n * ```${URLS[PHOTO]}```: Photos (maximum quality)\r\n * ```${URLS[VOICE]}```: Voice recordings\r\n * ```${URLS[STICKER]}```: Stickers\r\n * ```${URLS[DOCUMENT]}```: Any other file\r\n* ```$CONTACT```: This array contains info about contacts sent in a chat.\r\n * ```${CONTACT[NUMBER]}```: Phone number\r\n * ```${CONTACT[FIRST_NAME]}```: First name\r\n * ```${CONTACT[LAST_NAME]}```: Last name\r\n * ```${CONTACT[ID]}```: User id\r\n* ```$LOCATION```: This array contains info about locations sent in a chat.\r\n * ```${LOCATION[LONGITUDE]}```: Longitude\r\n * ```${LOCATION[LATITUDE]}```: Latitude\r\n\r\n### Usage\r\nTo send messages use the ```send_message``` function:\r\n```\r\nsend_message \"${USER[ID]}\" \"lol\"\r\n```\r\nTo send html or markdown put the following strings before the text, depending on the parsing mode you want to enable:\r\n```\r\nsend_message \"${USER[ID]}\" \"markdown_parse_mode lol *bold*\"\r\n```\r\n```\r\nsend_message \"${USER[ID]}\" \"html_parse_mode lol bold\"\r\n```\r\nThis function also allows a third parameter that disables additional function parsing (for safety use this when reprinting user input):\r\n```\r\nsend_message \"${USER[ID]}\" \"lol\" \"safe\"\r\n```\r\nTo send images, videos, voice files, photos ecc use the ```send_photo``` function (remember to change the safety Regex @ line 14 of command.sh to allow sending files only from certain directories):\r\n```\r\nsend_file \"${USER[ID]}\" \"/home/user/doge.jpg\" \"Lool\"\r\n```\r\nTo send custom keyboards use the ```send_keyboard``` function:\r\n```\r\nsend_keyboard \"${USER[ID]}\" \"Text that will appear in chat?\" \"Yep\" \"No\"\r\n```\r\nTo send locations use the ```send_location``` function:\r\n```\r\nsend_location \"${USER[ID]}\" \"Latitude\" \"Longitude\"\r\n```\r\nTo send venues use the ```send_venue``` function:\r\n```\r\nsend_venue \"${USER[ID]}\" \"Latitude\" \"Longitude\" \"Title\" \"Address\" \"optional foursquare id\"\r\n```\r\nTo forward messages use the ```forward``` function:\r\n```\r\nforward \"${USER[ID]}\" \"from_chat_id\" \"message_id\"\r\n```\r\nTo send a chat action use the ```send_action``` function.\r\nAllowed values: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for locations.\r\n```\r\nsend_action \"${USER[ID]}\" \"action\"\r\n```\r\n\r\nTo create interactive chats, write (or edit the question script) a normal bash (or C or python) script, chmod +x it and then change the argument of the startproc function to match the command you usually use to start the script.\r\nThe text that the script will output will be sent in real time to the user, and all user input will be sent to the script (as long as it's running or until the user kills it with /cancel).\r\nTo open up a keyboard in an interactive script, print out the keyboard layout in the following way:\r\n```\r\necho \"Text that will appear in chat? mykeyboardstartshere \\\"Yep, sure\\\" \\\"No, highly unlikely\\\"\"\r\n```\r\nSame goes for files:\r\n```\r\necho \"Text that will appear in chat? myfilelocationstartshere /home/user/doge.jpg\"\r\n```\r\nAnd locations:\r\n```\r\necho \"Text that will appear in chat. mylatstartshere 45 mylongstartshere 45\"\r\n```\r\nAnd venues:\r\n```\r\necho \"Text that will appear in chat. mylatstartshere 45 mylongstartshere 45 mytitlestartshere my home myaddressstartshere Diagon Alley N. 37\"\r\n```\r\nYou can combine them:\r\n```\r\necho \"Text that will appear in chat? mykeyboardstartshere \\\"Yep, sure\\\" \\\"No, highly unlikely\\\" myfilelocationstartshere /home/user/doge.jpg mylatstartshere 45 mylongstartshere 45\"\r\n```\r\nPlease note that you can either send a location or a venue, not both. To send a venue add the mytitlestartshere and the myaddressstartshere keywords.\r\n\r\nThe following commands allows users to interact with your bot via *inline queries*.\r\nIn order to enable **inline mode**, send `/setinline` command to [@BotFather](https://telegram.me/botfather) and provide the placeholder text that the user will see in the input field after typing your bot’s name.\r\nAlso, edit line 12 from `commands.sh` putting a \"1\".\r\nNote that you can't modify the first two parameters of the function `answer_inline_query`, only the ones after them.\r\n\r\nTo send messsages or links through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"article\" \"Title of the result\" \"Content of the message to be sent\"\r\n```\r\nTo send photos in jpeg format and less than 5MB, from a website through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"photo\" \"A valid URL of the photo\" \"URL of the thumbnail\"\r\n```\r\nTo send standard gifs from a website (less than 1MB) through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"gif\" \"gif url\"\r\n```\r\nTo send mpeg4 gifs from a website (less than 1MB) through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"mpeg4_gif\" \"mpeg4 gif url\"\r\n```\r\nTo send videos from a website through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"video\" \"valid video url\" \"Select one mime type: text/html or video/mp4\" \"URL of the thumbnail\" \"Title for the result\"\r\n```\r\nTo send photos stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_photo\" \"identifier for the photo\"\r\n```\r\nTo send gifs stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_gif\" \"identifier for the gif\"\r\n```\r\nTo send mpeg4 gifs stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_mpeg4_gif\" \"identifier for the gif\"\r\n```\r\nTo send stickers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_sticker\" \"identifier for the sticker\"\r\n```\r\n\r\n\r\nTo modify the responses to commands edit the commands.sh file (this should ease upgrades of the bot core).\r\n\r\nOnce you're done editing start the bot with ```./bashbot.sh start```. If you want to do some more changes make them and then rerun the same command.\r\nTo stop the bot run ```./bashbot.sh kill```.\r\nIf some thing doesn't work as it should, debug with ```bash -x bashbot.sh```.\r\n\r\nTo use the functions provided in this script in other scripts simply source bashbot: ```source bashbot.sh```\r\n\r\n\r\n## User count\r\nTo count the total number of users that ever used the bot run the following command:\r\n```\r\nbash bashbot.sh count\r\n```\r\n\r\n\r\n## Sending broadcasts to all users\r\nTo send a broadcast to all of users that ever used the bot run the following command:\r\n```\r\nbash bashbot.sh broadcast \"Hey! I just wanted to let you know that the bot's been updated!\"\r\n```\r\n\r\n\r\n\r\n\r\nThat's it!\r\n\r\nIf you feel that there's something missing or if you found a bug, feel free to submit a pull request!\r\n",
+ "body": "#bashbot\r\nA Telegram bot written in bash.\r\n\r\nDepends on [tmux](http://github.com/tmux/tmux).\r\nUses [JSON.sh](http://github.com/dominictarr/JSON.sh).\r\n\r\nReleased to the public domain wherever applicable.\r\nElsewhere, consider it released under the [WTFPLv2](http://www.wtfpl.net/txt/copying/).\r\n\r\n\r\n## Instructions\r\n### Create your first bot\r\n\r\n1. Message @botfather https://telegram.me/botfather with the following\r\ntext: `/newbot`\r\n If you don't know how to message by username, click the search\r\nfield on your Telegram app and type `@botfather`, you should be able\r\nto initiate a conversation. Be careful not to send it to the wrong\r\ncontact, because some users has similar usernames to `botfather`.\r\n\r\n ![botfather initial conversation](http://i.imgur.com/aI26ixR.png)\r\n\r\n2. @botfather replies with `Alright, a new bot. How are we going to\r\ncall it? Please choose a name for your bot.`\r\n\r\n3. Type whatever name you want for your bot.\r\n\r\n4. @botfather replies with `Good. Now let's choose a username for your\r\nbot. It must end in bot. Like this, for example: TetrisBot or\r\ntetris_bot.`\r\n\r\n5. Type whatever username you want for your bot, minimum 5 characters,\r\nand must end with `bot`. For example: `telesample_bot`\r\n\r\n6. @botfather replies with:\r\n\r\n Done! Congratulations on your new bot. You will find it at\r\ntelegram.me/telesample_bot. You can now add a description, about\r\nsection and profile picture for your bot, see /help for a list of\r\ncommands.\r\n\r\n Use this token to access the HTTP API:\r\n 123456789:AAG90e14-0f8-40183D-18491dDE\r\n\r\n For a description of the Bot API, see this page:\r\nhttps://core.telegram.org/bots/api\r\n\r\n7. Note down the 'token' mentioned above.\r\n\r\n8. Type `/setprivacy` to @botfather.\r\n\r\n ![botfather later conversation](http://i.imgur.com/tWDVvh4.png)\r\n\r\n9. @botfather replies with `Choose a bot to change group messages settings.`\r\n\r\n10. Type `@telesample_bot` (change to the username you set at step 5\r\nabove, but start it with `@`)\r\n\r\n11. @botfather replies with\r\n\r\n 'Enable' - your bot will only receive messages that either start\r\nwith the '/' symbol or mention the bot by username.\r\n 'Disable' - your bot will receive all messages that people send to groups.\r\n Current status is: ENABLED\r\n\r\n12. Type `Disable` to let your bot receive all messages sent to a\r\ngroup. This step is up to you actually.\r\n\r\n13. @botfather replies with `Success! The new status is: DISABLED. /help`\r\n\r\n### Install bashbot\r\nClone the repository:\r\n```\r\ngit clone --recursive https://github.com/topkecleon/telegram-bot-bash\r\n```\r\n\r\nCreate a file called token and paste the token in there.\r\nThen start editing the commands.\r\n\r\n### Receive data\r\nYou can read incoming data using the following variables:\r\n\r\n* ```$MESSAGE```: Incoming messages\r\n* ```$MESSAGE[ID]```: ID of incoming message\r\n* ```$CAPTION```: Captions\r\n* ```$USER```: This array contains the First name, last name, username and user id of the sender of the current message.\r\n * ```${USER[ID]}```: User id\r\n * ```${USER[FIRST_NAME]}```: User's first name\r\n * ```${USER[LAST_NAME]}```: User's last name\r\n * ```${USER[USERNAME]}```: Username\r\n* ```$CHAT```: This array contains the First name, last name, username, title and user id of the chat of the current message.\r\n * ```${CHAT[ID]}```: Chat id\r\n * ```${CHAT[FIRST_NAME]}```: Chat's first name\r\n * ```${CHAT[LAST_NAME]}```: Chat's last name\r\n * ```${CHAT[USERNAME]}```: Username\r\n * ```${CHAT[TITLE]}```: Title\r\n * ```${CHAT[TYPE]}```: Type\r\n * ```${CHAT[ALL_MEMBERS_ARE_ADMINISTRATORS]}```: All members are administrators (true if true)\r\n* ```$URLS```: This array contains documents, audio files, stickers, voice recordings and stickers stored in the form of URLs.\r\n * ```${URLS[AUDIO]}```: Audio files\r\n * ```${URLS[VIDEO]}```: Videos\r\n * ```${URLS[PHOTO]}```: Photos (maximum quality)\r\n * ```${URLS[VOICE]}```: Voice recordings\r\n * ```${URLS[STICKER]}```: Stickers\r\n * ```${URLS[DOCUMENT]}```: Any other file\r\n* ```$CONTACT```: This array contains info about contacts sent in a chat.\r\n * ```${CONTACT[NUMBER]}```: Phone number\r\n * ```${CONTACT[FIRST_NAME]}```: First name\r\n * ```${CONTACT[LAST_NAME]}```: Last name\r\n * ```${CONTACT[ID]}```: User id\r\n* ```$LOCATION```: This array contains info about locations sent in a chat.\r\n * ```${LOCATION[LONGITUDE]}```: Longitude\r\n * ```${LOCATION[LATITUDE]}```: Latitude\r\n\r\n### Usage\r\nTo send messages use the ```send_message``` function:\r\n```\r\nsend_message \"${CHAT[ID]}\" \"lol\"\r\n```\r\nTo send html or markdown put the following strings before the text, depending on the parsing mode you want to enable:\r\n```\r\nsend_message \"${CHAT[ID]}\" \"markdown_parse_mode lol *bold*\"\r\n```\r\n```\r\nsend_message \"${CHAT[ID]}\" \"html_parse_mode lol bold\"\r\n```\r\nThis function also allows a third parameter that disables additional function parsing (for safety use this when reprinting user input):\r\n```\r\nsend_message \"${CHAT[ID]}\" \"lol\" \"safe\"\r\n```\r\nTo send images, videos, voice files, photos ecc use the ```send_photo``` function (remember to change the safety Regex @ line 14 of command.sh to allow sending files only from certain directories):\r\n```\r\nsend_file \"${CHAT[ID]}\" \"/home/user/doge.jpg\" \"Lool\"\r\n```\r\nTo send custom keyboards use the ```send_keyboard``` function:\r\n```\r\nsend_keyboard \"${CHAT[ID]}\" \"Text that will appear in chat?\" \"Yep\" \"No\"\r\n```\r\nTo send locations use the ```send_location``` function:\r\n```\r\nsend_location \"${CHAT[ID]}\" \"Latitude\" \"Longitude\"\r\n```\r\nTo send venues use the ```send_venue``` function:\r\n```\r\nsend_venue \"${CHAT[ID]}\" \"Latitude\" \"Longitude\" \"Title\" \"Address\" \"optional foursquare id\"\r\n```\r\nTo forward messages use the ```forward``` function:\r\n```\r\nforward \"${CHAT[ID]}\" \"from_chat_id\" \"message_id\"\r\n```\r\nTo send a chat action use the ```send_action``` function.\r\nAllowed values: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for locations.\r\n```\r\nsend_action \"${CHAT[ID]}\" \"action\"\r\n```\r\n\r\nTo create interactive chats, write (or edit the question script) a normal bash (or C or python) script, chmod +x it and then change the argument of the startproc function to match the command you usually use to start the script.\r\nThe text that the script will output will be sent in real time to the user, and all user input will be sent to the script (as long as it's running or until the user kills it with /cancel).\r\nTo open up a keyboard in an interactive script, print out the keyboard layout in the following way:\r\n```\r\necho \"Text that will appear in chat? mykeyboardstartshere \\\"Yep, sure\\\" \\\"No, highly unlikely\\\"\"\r\n```\r\nSame goes for files:\r\n```\r\necho \"Text that will appear in chat? myfilelocationstartshere /home/user/doge.jpg\"\r\n```\r\nAnd locations:\r\n```\r\necho \"Text that will appear in chat. mylatstartshere 45 mylongstartshere 45\"\r\n```\r\nAnd venues:\r\n```\r\necho \"Text that will appear in chat. mylatstartshere 45 mylongstartshere 45 mytitlestartshere my home myaddressstartshere Diagon Alley N. 37\"\r\n```\r\nYou can combine them:\r\n```\r\necho \"Text that will appear in chat? mykeyboardstartshere \\\"Yep, sure\\\" \\\"No, highly unlikely\\\" myfilelocationstartshere /home/user/doge.jpg mylatstartshere 45 mylongstartshere 45\"\r\n```\r\nPlease note that you can either send a location or a venue, not both. To send a venue add the mytitlestartshere and the myaddressstartshere keywords.\r\n\r\nThe following commands allows users to interact with your bot via *inline queries*.\r\nIn order to enable **inline mode**, send `/setinline` command to [@BotFather](https://telegram.me/botfather) and provide the placeholder text that the user will see in the input field after typing your bot’s name.\r\nAlso, edit line 12 from `commands.sh` putting a \"1\".\r\nNote that you can't modify the first two parameters of the function `answer_inline_query`, only the ones after them.\r\n\r\nTo send messsages or links through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"article\" \"Title of the result\" \"Content of the message to be sent\"\r\n```\r\nTo send photos in jpeg format and less than 5MB, from a website through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"photo\" \"A valid URL of the photo\" \"URL of the thumbnail\"\r\n```\r\nTo send standard gifs from a website (less than 1MB) through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"gif\" \"gif url\"\r\n```\r\nTo send mpeg4 gifs from a website (less than 1MB) through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"mpeg4_gif\" \"mpeg4 gif url\"\r\n```\r\nTo send videos from a website through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"video\" \"valid video url\" \"Select one mime type: text/html or video/mp4\" \"URL of the thumbnail\" \"Title for the result\"\r\n```\r\nTo send photos stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_photo\" \"identifier for the photo\"\r\n```\r\nTo send gifs stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_gif\" \"identifier for the gif\"\r\n```\r\nTo send mpeg4 gifs stored in Telegram servers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_mpeg4_gif\" \"identifier for the gif\"\r\n```\r\nTo send stickers through an *inline query*:\r\n```\r\nanswer_inline_query \"$iQUERY_ID\" \"cached_sticker\" \"identifier for the sticker\"\r\n```\r\n\r\n\r\nTo modify the responses to commands edit the commands.sh file (this should ease upgrades of the bot core).\r\n\r\nOnce you're done editing start the bot with ```./bashbot.sh start```. If you want to do some more changes make them and then rerun the same command.\r\nTo stop the bot run ```./bashbot.sh kill```.\r\nIf some thing doesn't work as it should, debug with ```bash -x bashbot.sh```.\r\n\r\nTo use the functions provided in this script in other scripts simply source bashbot: ```source bashbot.sh```\r\n\r\n\r\n## User count\r\nTo count the total number of users that ever used the bot run the following command:\r\n```\r\nbash bashbot.sh count\r\n```\r\n\r\n\r\n## Sending broadcasts to all users\r\nTo send a broadcast to all of users that ever used the bot run the following command:\r\n```\r\nbash bashbot.sh broadcast \"Hey! I just wanted to let you know that the bot's been updated!\"\r\n```\r\n\r\n\r\n\r\n\r\nThat's it!\r\n\r\nIf you feel that there's something missing or if you found a bug, feel free to submit a pull request!\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}
\ No newline at end of file
diff --git a/stylesheets/github-light.css b/stylesheets/github-light.css
index d64ba5d..0c6b24d 100644
--- a/stylesheets/github-light.css
+++ b/stylesheets/github-light.css
@@ -1,7 +1,7 @@
/*
The MIT License (MIT)
-Copyright (c) 2015 GitHub, Inc.
+Copyright (c) 2016 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,18 +27,18 @@ SOFTWARE.
color: #969896;
}
-.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */,
+.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-s .pl-v /* string variable */ {
color: #0086b3;
}
-.pl-e /* entity */,
+.pl-e /* entity */,
.pl-en /* entity.name */ {
color: #795da3;
}
-.pl-s .pl-s1 /* string source */,
-.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ {
+.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
+.pl-s .pl-s1 /* string source */ {
color: #333;
}
@@ -50,13 +50,13 @@ SOFTWARE.
color: #a71d5d;
}
-.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
-.pl-s /* string */,
+.pl-s /* string */,
+.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
-.pl-sr /* string.regexp */,
-.pl-sr .pl-cce /* string.regexp constant.character.escape */,
-.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */,
-.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ {
+.pl-sr /* string.regexp */,
+.pl-sr .pl-cce /* string.regexp constant.character.escape */,
+.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
+.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: #183691;
}
@@ -69,24 +69,24 @@ SOFTWARE.
}
.pl-ii /* invalid.illegal */ {
- background-color: #b52a1d;
color: #f8f8f8;
+ background-color: #b52a1d;
}
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
- color: #63a35c;
font-weight: bold;
+ color: #63a35c;
}
.pl-ml /* markup.list */ {
color: #693a17;
}
-.pl-mh /* markup.heading */,
+.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
-.pl-ms /* meta.separator */ {
- color: #1d3e81;
+.pl-ms /* meta.separator */ {
font-weight: bold;
+ color: #1d3e81;
}
.pl-mq /* markup.quote */ {
@@ -94,28 +94,28 @@ SOFTWARE.
}
.pl-mi /* markup.italic */ {
- color: #333;
font-style: italic;
+ color: #333;
}
.pl-mb /* markup.bold */ {
- color: #333;
font-weight: bold;
+ color: #333;
}
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
- background-color: #ffecec;
color: #bd2c00;
+ background-color: #ffecec;
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
- background-color: #eaffea;
color: #55a532;
+ background-color: #eaffea;
}
.pl-mdr /* meta.diff.range */ {
- color: #795da3;
font-weight: bold;
+ color: #795da3;
}
.pl-mo /* meta.output */ {