<commit_before>const fs = require('fs')

function write_obj(guilds_list, message, helper) {
    fs.writeFile('./json/guilds.json', JSON.stringify(guilds_list), (err) => {
        if (err) console.log(err)
        helper.log(message, '  wrote guilds list object successfully')
    }) 
}

module.exports = (message, client, helper) => {
    if (message.content) {
        let to_disable = message.content.split(' ')
        let _enabled = []
        for (cmd of to_disable) {
            if (require('../../consts').cmdlist.indexOf(cmd) != -1) {
                let index = client.guilds_list[message.guild.id].disabled[message.channel.id].indexOf(cmd)
                client.guilds_list[message.guild.id].disabled[message.channel.id].splice(index, 1)
                _enabled.push(cmd)
            }
        }
        <commit_msg>fix trying to enable a command that isnt disabled<commit_after>const fs = require('fs')

function write_obj(guilds_list, message, helper) {
    fs.writeFile('./json/guilds.json', JSON.stringify(guilds_list), (err) => {
        if (err) console.log(err)
        helper.log(message, '  wrote guilds list object successfully')
    }) 
}

module.exports = (message, client, helper) => {
    if (message.content) {
        let to_disable = message.content.split(' ')
        let _enabled = []
        for (cmd of to_disable) {
            if (client.guilds_list[message.guild.id].disabled[message.channel.id]
                && client.guilds_list[message.guild.id].disabled[message.channel.id].indexOf(cmd) != -1) {
                if (require('../../consts').cmdlist.indexOf(cmd) != -1) {
                    let index = client.guilds_list[message.guild.id].disabled[message.channel.id].indexOf(cmd)
                    client.guilds_list[message.guild.id].disabled[message.channel.id].splice(index, 1)
                    _enabled.push(cmd)
                }
            }
        }
        
{'fraction_non_alphanumeric': 0.14606155451225875, 'fraction_numerical': 0.0026082420448617634, 'mean_word_length': 2.312607944732297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7452610', 'n_tokens_mistral': 602, 'n_tokens_neox': 588, 'n_words': 98}