Skip to content

Commit

Permalink
Fixed sanctions commands not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayfri committed Oct 24, 2020
1 parent b14ed93 commit c867ef4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/classes/SanctionCommand.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Command = require('../entities/Command.js');
const {runError} = require('../utils/Errors.js');
const {argTypes} = require('../constants.js');
const {readJSON} = require('../utils/Utils.js');
const {getArg} = require('../utils/ArgUtils.js');
Expand Down Expand Up @@ -53,7 +54,9 @@ module.exports = class SanctionCommand extends Command {
case: this.userData.sanctionsLastNumber,
});
this.userData.sanctionsLastNumber++;
writeInJSON('./assets/jsons/userData.json', this.userData);
if (!writeInJSON('./assets/jsons/userData.json', this.userData)) {
return runError(this.message, this, `Tentative d'écriture dans le fichier './assets/jsons/userdata.json', le fichier n'a pas été trouvé.`);
}

const embed = new MessageEmbed();
embed.setTimestamp();
Expand Down

0 comments on commit c867ef4

Please sign in to comment.