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

26 lines
382 B
JavaScript
Raw Normal View History

2017-07-24 17:12:38 +02:00
'use strict';
// Utils
const { logError } = require('./utils/log');
2017-09-21 13:57:49 +04:30
/**
* @type {Telegraf}
* Bot
*/
2017-09-21 13:57:49 +04:30
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'),
);
2017-07-24 18:08:31 +02:00
bot.catch(logError);
2017-09-24 18:34:32 +02:00
2017-07-24 17:12:38 +02:00
bot.startPolling();