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

26 lines
382 B
JavaScript

'use strict';
// Utils
const { logError } = require('./utils/log');
/**
* @type {Telegraf}
* Bot
*/
const bot = require('./bot');
bot.telegram.getMe().then((botInfo) => {
bot.options.username = botInfo.username;
});
bot.use(
require('./handlers/middlewares'),
require('./handlers/messages'),
require('./handlers/commands'),
);
bot.catch(logError);
bot.startPolling();