mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-11-22 16:35:40 +01:00
Clear out arrays before caching.
This commit is contained in:
parent
cd6211fb7d
commit
2a4a0d689f
@ -90,6 +90,7 @@ client.on('message', message => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Cache all command modules.
|
// Cache all command modules.
|
||||||
|
cachedModules = [];
|
||||||
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') {
|
||||||
@ -99,6 +100,7 @@ require("fs").readdirSync('./commands/').forEach(function(file) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Cache all triggers.
|
// Cache all triggers.
|
||||||
|
cachedTriggers = [];
|
||||||
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') {
|
||||||
|
Loading…
Reference in New Issue
Block a user