Simple Telegram bot for sending site fragments to chat when users clicks Ctrl+Enter (e.g. when found a typo)
- bot.rb - bot code, uses telegram-bot-ruby and sinatra gems
- ctrlEnter.js - site JS code, send selected fragment to bot url, uses jQuery
- spellbot_token - Telegram bot token
- spellbot_chat_id - chat id where we should send fragments
- spellbot_domain - allowed domain for fragment sending (spam prevention)
- /start - did nothing, just confirm that bot is works
- /info - returns your chat_id
- /help - returns commands explanation
- Register your bot and get token - https://core.telegram.org/bots
- Launch bot.rb on your favorite server with your favorite software (I prefer Heroku)
- Get your chat_id with /info command
- Add ctrlEnter.js to your site (do not forget change https://yourbot.com to your bot URL)
Maintainer: Anton Markelov
License: MIT
Thank Ganeshji Marwaha for this article: http://www.gmarwaha.com/blog/2009/06/16/ctrl-key-combination-simple-jquery-plugin/. I don't know JS and this text helped me a lot.