{"size": 615, "ext": "js", "max_stars_repo_path": "src/bot.js", "max_stars_repo_name": "fabriciosenadev/telegram-mini-bot", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/bot.js", "max_issues_repo_name": "fabriciosenadev/telegram-mini-bot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/bot.js", "max_forks_repo_name": "fabriciosenadev/telegram-mini-bot", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.75, "max_line_length": 77, "alphanum_fraction": 0.725203252}
'use strict'

const settings = require('./settings');
const Telegram = require('telegram-node-bot');
const TextCommand = Telegram.TextCommand;
const RegexpCommand = Telegram.RegexpCommand;
const bot = new Telegram.Telegram(settings.token);

const BotController = require('./controllers/BotController');
const UserController = require('./controllers/UserController');


bot.router
    .when(new TextCommand('/start', 'start'), new BotController());

bot.router
    .when(new TextCommand('/help', 'help'), new BotController());

bot.router
    .when(new RegexpCommand(/\/email (.+)$/, 'email'), new UserController());