mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-23 02:17:47 +00:00
26 lines
382 B
JavaScript
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();
|