mirror of
https://github.com/citra-emu/discord-bot.git
synced 2024-12-22 19:36:07 +00: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.
|
||||
cachedModules = [];
|
||||
require("fs").readdirSync('./commands/').forEach(function(file) {
|
||||
// Load the module if it's a script.
|
||||
if (path.extname(file) == '.js') {
|
||||
|
@ -99,6 +100,7 @@ require("fs").readdirSync('./commands/').forEach(function(file) {
|
|||
});
|
||||
|
||||
// Cache all triggers.
|
||||
cachedTriggers = [];
|
||||
require("fs").readdirSync('./triggers/').forEach(function(file) {
|
||||
// Load the trigger if it's a script.
|
||||
if (path.extname(file) == '.js') {
|
||||
|
|
Loading…
Reference in a new issue