This repo contains a simple Telegram bot designed to make pairs of donors & recepients.
Clone project to your computer.
$ git clone https://github.com/GitStearis/secret-santa-bot.git
To start with this project, you should have Node installed. If you want to run your database locally, install MongoDB.
Install all dependencies in a root folder.
$ npm install
To launch a bot locally you should create .env file in a root directory. File should contain:
PORT =
NODE_ENV =
TELEGRAM_TOKEN =
MONGODB_CONNECTION =
HEROKU_URL =
ADMIN_USERNAME =
PORT- port for the development needs. Use3000if you are not sure about this;NODE_ENV- a string showing the current application mode. Usedevelopmentwhen running locally, otherwise set it toproduction;TELEGRAM_TOKEN- a token provided by Bot Father after your bot creation;MONGODB_CONNECTION- a MongoDB connection string;HEROKU_URL- an URL of your deployment. Is used to set up a webhook when running in production mode;ADMIN_USERNAME- a service variable, helps bot to understand who have sufficient rights to start shuffling.
To run the bot on the localhost type npm start in a root folder.
$ npm start
- Node.js - JavaScript runtime for server;
- npm - Package manager for JavaScript;
- Telegraf.js - Modern Telegram bot framework for Node.js;
- MongoDB - NoSQL Database;
- Mongoose - ODM for MongoDB.
- George Puisha - GitStearis.