mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-25 04:05:45 +01:00
Updated disabled module and trigger code.
This commit is contained in:
parent
2509bd2179
commit
af4fb4d2fc
16
server.js
16
server.js
@ -106,8 +106,12 @@ cachedModules = [];
|
||||
require("fs").readdirSync('./commands/').forEach(function(file) {
|
||||
// Load the module if it's a script.
|
||||
if (path.extname(file) == '.js') {
|
||||
logger.info(`Loaded module: ${file}`);
|
||||
cachedModules[file] = require(`./commands/${file}`);
|
||||
if (file.includes('.disabled')) {
|
||||
logger.info(`Did not load disabled module: ${file}`);
|
||||
} else {
|
||||
logger.info(`Loaded module: ${file}`);
|
||||
cachedModules[file] = require(`./commands/${file}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -116,8 +120,12 @@ cachedTriggers = [];
|
||||
require("fs").readdirSync('./triggers/').forEach(function(file) {
|
||||
// Load the trigger if it's a script.
|
||||
if (path.extname(file) == '.js') {
|
||||
logger.info(`Loaded trigger: ${file}`);
|
||||
cachedTriggers.push(require(`./triggers/${file}`));
|
||||
if (file.includes('.disabled')) {
|
||||
logger.info(`Did not load disabled trigger: ${file}`);
|
||||
} else {
|
||||
logger.info(`Loaded trigger: ${file}`);
|
||||
cachedTriggers.push(require(`./triggers/${file}`));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user