Ryazan FrontEnd community bot.
Project plan - "bot".
Contribute to our site project - @kitos/web-purple.
- Send last post from VKontakte community;
- Send future events information - Moscow time (GMT+3);
- Send Community and Contribution links;
- Send event ICS files;
- Send newsletter and delete messages by command;
- New posts subscription;
- News category filtering;
- Easy Heroku deploy;
- Simple locale debug;
- Posting news from VKontakte in public chats and channels;
- Multilanguage messages.
- Git;
- MongoDB;
- NodeJS, npm;
- Telegram: client, account;
- Heroku account (deploy test bot);
- VKontakte account (VK integrations).
ENV Key | config.js |
Values | How to get? |
---|---|---|---|
PORT | port | Application port (default: 8000 ) |
Autoconfigured for Heroku by runner |
NODE_ENV | isProduction | ENV | Autoconfigured: NODE_ENV !== 'development' |
MONGODB_URI | mongoDB | MongoDB full url | Autoconfigured for Heroku by mLab |
HOOK_URL | hookUrl | Telegram bot WebHook url | For Heroku: https://<your-app-name>.herokuapp.com |
BOT_TOKEN | botToken | Telegram bot-API token | Hot do I create bot? |
VK_KEY | vkSecret | VKontakte secret key (any ) |
Think about it 😎 |
VK_RESPONSE | vkResponse | VKontakte WebHook response | VKontakte Callback API |
VK_USER_TOKEN | vkUserKey | VKontakte User Token | VKontakte User Token |
VK_COMMUNITY | vkCommunity | VKontakte community domain | Your community custom domain https://vk.com/<domain> |
VK_COMMUNITY_ID | vkCommunityId | VKontakte community id | Your community id |
VK_SERVICE | vkServiceKey | VKontakte Service Token | VKontakte Service Token |
KEEN_PROJECT_ID | none | Keen project id | Autoconfigured for Heroku by Keen |
KEEN_WRITE_KEY | none | Keen API write key | Autoconfigured for Heroku by Keen |
NOTIFY_USER | notifyUserId | Telegram user id | User for error notification |
-
Configure environment variables in
config.js
file.
Do not publish access keys to public! -
Install and run application:
git clone https://github.com/ifedyukin/webpurple-tg-bot
cd webpurple-tg-bot
npm install
npm run development
- Run tests and linter
npm run test
npm run lint
- Click "Deploy to Heroku" button in the top of
README
. - Follow the directions.
- Navigate to instance
Settings
page, clickReveal Config Vars
and configure environment variables. - Navigate to instance
Deploy
page, select deployment method (you can configure autodeploy from your fork repository).