2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-23 02:17:47 +00:00
the-guard-bot/bot/index.js

18 lines
485 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
2020-03-10 22:10:48 +01:00
/** @typedef { import('../typings/context').ExtendedContext } ExtendedContext */
/** @type { import('telegraf/typings').Telegraf<ExtendedContext> } */
2017-09-21 13:57:49 +04:30
const bot = new Telegraf(config.token);
2020-06-06 10:51:46 +02: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'));