Added logging for loading modules and triggers.
This commit is contained in:
parent
02ec9079ff
commit
5a1eba8b2a
|
@ -23,6 +23,7 @@ client.on('ready', () => {
|
||||||
require("fs").readdirSync('./commands/').forEach(function(file) {
|
require("fs").readdirSync('./commands/').forEach(function(file) {
|
||||||
// Load the module if it's a script.
|
// Load the module if it's a script.
|
||||||
if (path.extname(file) == '.js') {
|
if (path.extname(file) == '.js') {
|
||||||
|
logger.info(`Loaded module: ${file}`);
|
||||||
cachedModules[file] = require(`./commands/${file}`);
|
cachedModules[file] = require(`./commands/${file}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -31,6 +32,7 @@ client.on('ready', () => {
|
||||||
require("fs").readdirSync('./triggers/').forEach(function(file) {
|
require("fs").readdirSync('./triggers/').forEach(function(file) {
|
||||||
// Load the trigger if it's a script.
|
// Load the trigger if it's a script.
|
||||||
if (path.extname(file) == '.js') {
|
if (path.extname(file) == '.js') {
|
||||||
|
logger.info(`Loaded trigger: ${file}`);
|
||||||
cachedTriggers.push(require(`./triggers/${file}`));
|
cachedTriggers.push(require(`./triggers/${file}`));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue