1
0
Fork 0

Failsafe i guess

refactor/models
Bsian 2019-12-23 23:15:39 +00:00
parent 692b4af059
commit 9e0ead2520
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ export default class Load extends Command {
delete require.cache[`${corepath}/class/Util.js`]; delete require.cache[`${corepath}/class/Util.js`];
} else { } else {
try { try {
delete require.cache[`${corepath}/commands/index.js`];
delete require.cache[`${corepath}/commands/${args[1]}.js`];
const cmdIndex = require('../commands'); const cmdIndex = require('../commands');
let Cmd = cmdIndex[args[1]]; let Cmd = cmdIndex[args[1]];
if (!Cmd) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Could not find file***`); if (!Cmd) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Could not find file***`);