Skip to content

Telegram bot to receive messages from vk and reply to them

License

Notifications You must be signed in to change notification settings

DenisRylskiy/vk-messages-bot

 
 

Repository files navigation

VK Messages Telegram Bot

Listens for your messages updates and forwards them to your Telegram.

Installation

Quick Start for Ubuntu 16.04

# install git and python3
sudo apt update
sudo apt install git python3 python3-dev python3-pip
# clone repository
git clone https://github.com/zaynetro/vk-messages-bot.git
cd vk-messages-bot
# update python pip and install module requirements
sudo -H pip3 install -U pip setuptools wheel
sudo -H pip3 install -r requirements.txt
cp set_env.example.sh set_env.sh
  • Create standalone VK app with any name and copy its App ID from settings to set_env.sh
  • Create new Telegram bot with any name by sending /newbot command to @BotFather and copy token to access the HTTP API to set_env.sh
  • Configure bot with commands from bot_info.md

Run

chmod +x run.sh
./run.sh

You can specify reset-db parameter, if you messed up the database. You can always just remove the database file.

Update

git pull
sudo -H pip3 install -r requirements.txt

Deploying to Heroku

Install Heroku Toolbelt, then:

cd vk-messages-bot
heroku login
heroku create vk-messages-bot # create app
heroku buildpacks:set heroku/python # set python buildpack
git push heroku master # deploy app to heroku
heroku config:set VK_CLIENT_ID='<VK_APP_CLIENT_ID>' # set config vars
heroku config:set TELEGRAM_TOKEN='<TELEGRAM_TOKEN>'
heroku ps:scale worker=1 # start 1 worker dyno
heroku ps:stop worker # or stop worker dyno

About

Telegram bot to receive messages from vk and reply to them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.6%
  • Shell 1.4%