Skip to content

findscode/secret-santa-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Secret Santa Bot

This repo contains a simple Telegram bot designed to make pairs of donors & recepients.

Getting started

Clone project to your computer.

$ git clone https://github.com/GitStearis/secret-santa-bot.git

Prerequisites

To start with this project, you should have Node installed. If you want to run your database locally, install MongoDB.

Installing

Install all dependencies in a root folder.

$ npm install

Configuring

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. Use 3000 if you are not sure about this;
  • NODE_ENV - a string showing the current application mode. Use development when running locally, otherwise set it to production;
  • 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.

Launching

To run the bot on the localhost type npm start in a root folder.

$ npm start

Built With

  • 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.

Developed by

About

๐ŸŽ… Simple Telegram bot designed to shuffle presents among users

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published