mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-06 10:11:27 +03:00
Logger and fastify, settings server
This commit is contained in:
10
src/index.js
10
src/index.js
@@ -60,7 +60,7 @@ const config = require('../user/config');
|
||||
|
||||
require('./banner')();
|
||||
|
||||
const Logger = require('leekslazylogger');
|
||||
const Logger = require('leekslazylogger-fastify');
|
||||
const log = new Logger({
|
||||
name: 'DiscordTickets by eartharoid',
|
||||
debug: config.debug,
|
||||
@@ -72,6 +72,10 @@ const log = new Logger({
|
||||
title: 'info',
|
||||
prefix: 'commands'
|
||||
},
|
||||
http: {
|
||||
title: 'info',
|
||||
prefix: 'http'
|
||||
},
|
||||
plugins: {
|
||||
title: 'info',
|
||||
prefix: 'plugins'
|
||||
@@ -88,6 +92,7 @@ const I18n = require('@eartharoid/i18n');
|
||||
const { CommandManager } = require('./modules/commands');
|
||||
const TicketManager = require('./modules/tickets');
|
||||
const { PluginManager } = require('./modules/plugins');
|
||||
const SettingsServer = require('./server');
|
||||
|
||||
require('./modules/structures')(); // load extended structures before creating the client
|
||||
|
||||
@@ -142,6 +147,9 @@ class Bot extends Client {
|
||||
this.plugins = new PluginManager(this);
|
||||
this.plugins.load(); // load plugins
|
||||
|
||||
/** SettingsServer internal plugin instance */
|
||||
this.server = new SettingsServer(this);
|
||||
|
||||
this.log.info('Connecting to Discord API...');
|
||||
|
||||
this.login();
|
||||
|
Reference in New Issue
Block a user