comments
This commit is contained in:
parent
2b6ac43e9b
commit
a78e759ba9
1 changed files with 3 additions and 2 deletions
5
index.js
5
index.js
|
@ -13,8 +13,10 @@ const colors = require('colors')
|
||||||
const Discord = require('discord.js')
|
const Discord = require('discord.js')
|
||||||
const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
|
const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
|
||||||
|
|
||||||
|
// Load functions module
|
||||||
require('./modules/functions')(client)
|
require('./modules/functions')(client)
|
||||||
|
|
||||||
|
// Logger
|
||||||
client.logger = require('tracer').colorConsole({
|
client.logger = require('tracer').colorConsole({
|
||||||
format: [
|
format: [
|
||||||
'{{timestamp}} <{{title}}> {{message}}',
|
'{{timestamp}} <{{title}}> {{message}}',
|
||||||
|
@ -36,6 +38,7 @@ client.logger = require('tracer').colorConsole({
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Load environment variables / config
|
||||||
if (fs.existsSync('./.env') === false) {
|
if (fs.existsSync('./.env') === false) {
|
||||||
client.logger.fatal('The .env file is missing! Please create a .env file.')
|
client.logger.fatal('The .env file is missing! Please create a .env file.')
|
||||||
process.exit()
|
process.exit()
|
||||||
|
@ -56,8 +59,6 @@ client.aliases = new Discord.Collection()
|
||||||
|
|
||||||
// Initialization function
|
// Initialization function
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
// Load modules
|
|
||||||
|
|
||||||
// Load events
|
// Load events
|
||||||
fs.readdir('./events', (err, files) => {
|
fs.readdir('./events', (err, files) => {
|
||||||
if (err) {}
|
if (err) {}
|
||||||
|
|
Loading…
Reference in a new issue