mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-22 18:08:51 +00:00
18 lines
485 B
JavaScript
18 lines
485 B
JavaScript
'use strict';
|
|
|
|
const Telegraf = require('telegraf');
|
|
const { config } = require('../utils/config');
|
|
|
|
/** @typedef { import('../typings/context').ExtendedContext } ExtendedContext */
|
|
|
|
/** @type { import('telegraf/typings').Telegraf<ExtendedContext> } */
|
|
const bot = new Telegraf(config.token);
|
|
|
|
bot.polling.offset = -1;
|
|
|
|
module.exports = bot;
|
|
|
|
// cyclic dependency
|
|
// bot/index requires context requires actions/warn requires bot/index
|
|
Object.assign(bot.context, require('./context'));
|