"body":"#bashbot\r\nATelegrambotwritteninbash.\r\n\r\nDependson[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 <b>123456789:AAG90e14-0f8-40183D-18491dDE</b>\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 rec