1
0
Fork 0

rm on failure

refactor/models
Matthew 2019-10-29 20:27:36 -04:00
parent d1d324ceb0
commit 786a14d126
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ export default class CWG extends Command {
} }
} catch (err) { } catch (err) {
this.client.util.handleError(err, message, this); this.client.util.handleError(err, message, this);
await fs.unlink(`/etc/nginx/sites-available/${args[2]}`);
await fs.unlink(`/etc/nginx/sites-enabled/${args[2]}`);
await this.client.db.Domain.deleteMany({ domain: args[2] });
} }
} else if (args[0] === 'data') { } else if (args[0] === 'data') {
if (!args[1]) return this.client.commands.get('help').run(message, [this.name]); if (!args[1]) return this.client.commands.get('help').run(message, [this.name]);