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

24 lines
468 B
JavaScript
Raw Normal View History

2020-05-13 22:59:23 +02:00
// @ts-check
2017-07-24 17:12:38 +02:00
'use strict';
2019-03-18 19:05:16 +01:00
process.chdir(__dirname);
2020-04-29 18:01:53 +02:00
require('ts-node').register({ transpileOnly: true });
2019-03-18 19:05:16 +01:00
2017-07-24 17:12:38 +02:00
// Utils
const { logError } = require('./utils/log');
2017-09-21 13:57:49 +04:30
const bot = require('./bot');
bot.use(
require('./handlers/middlewares'),
2017-10-27 18:43:33 +02:00
require('./plugins'),
require('./handlers/commands'),
require('./handlers/regex'),
require('./handlers/unmatched'),
);
bot.catch(logError);
2020-02-19 14:32:25 +01:00
2020-05-13 22:59:23 +02:00
// eslint-disable-next-line @typescript-eslint/no-floating-promises
2020-02-19 14:32:25 +01:00
bot.launch();