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
2022-03-26 14:26:10 +01:00

28 lines
572 B
JavaScript

// @ts-check
'use strict';
process.chdir(__dirname);
require('ts-node').register({ transpileOnly: true });
// Make sure data folder exists
const fs = require('fs');
fs.mkdirSync('./data', { recursive: true });
// Utils
const { logError } = require('./utils/log');
const bot = require('./bot');
bot.use(
require('./handlers/middlewares'),
require('./plugins'),
require('./handlers/commands'),
require('./handlers/regex'),
require('./handlers/unmatched'),
);
bot.catch(logError);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
bot.launch();