2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-22 18:08:51 +00:00
the-guard-bot/bot/index.js

17 lines
382 B
JavaScript
Raw Normal View History

2017-09-21 13:57:49 +04:30
'use strict';
const Telegraf = require('telegraf');
2020-03-09 23:27:19 +01:00
const { config } = require('../utils/config');
2017-09-21 13:57:49 +04:30
const bot = new Telegraf(config.token);
if (process.env.NODE_ENV === 'development') {
2018-02-10 20:20:17 +01:00
bot.polling.offset = -1;
}
2017-09-21 13:57:49 +04:30
module.exports = bot;
2018-05-05 20:10:22 +02:00
// cyclic dependency
// bot/index requires context requires actions/warn requires bot/index
Object.assign(bot.context, require('./context'));