<commit_before>const { inspect } = require("util");

exports.run = async (client, message, [action, key, ...value]) => {
  const settings = client.settings.get(message.guild.id);

  if(action === "edit") {
    if(!key) return message.reply("Please specify a key to edit");
    if(!settings[key]) return message.reply("This key does not exist in the settings");
    if(!value) return message.reply("Please specify a new value");

    settings[key] = value.join(" ");
    client.settings.set(message.guild.id, settings);
    message.reply(`${key} successfully edited to ${value}`);
  } else
  if(action === "get") {
    if(!key) return message.reply("Please specify a key to view");
    if(!settings[key]) return message.reply("This key does not exist in the settings");
    message.reply(`The value of ${key} is currently ${settings[key]}`);
  } else {
    message.channel.send(inspect(settings), {code: "json"});
  }
};

exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ["setting", "settings", "conf"],
  permLevel: 3
};

exports.help = {
  name: "set",
  category: "System",
  description: "View or change settings for your server.",
  usage: "set <view/get/edit> <key> <value>"
};<commit_msg>Maybe this will work...<commit_after>const { inspect } = require("util");

exports.run = async (client, message, [action, key, ...value]) => {
  const settings = client.settings.get(message.guild.id);
  const default = client.config.defaultSettings;

  if(action === "edit") {
    if(!key) return message.reply("Please specify a key to edit");
    if(!settings[key]) return message.reply("This key does not exist in the settings");
    if(!value) return message.reply("Please specify a new value");

    settings[key] = value.join(" ");
    client.settings.set(message.guild.id, settings);
    message.reply(`${key} successfully edited to ${value}`);
  } else
  if(action === "get") {
    if(!key) return message.reply("Please specify a key to view");
    if(!settings[key]) return message.reply("This key does not exist in the settings");
    message.reply(`The value of ${key} is currently ${settings[key]}`);
  } if (action === "reset") {
    client.settings.set(message.guild.id, default);
  }else {
    message.channel.send(inspect(settings), {code: "json"});
  }
};

exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: ["setting", "settings", "conf"],
  permLevel: 3
};

exports.help = {
  name: "set",
  category: "System",
  description: "View or change settings for your server.",
  usage: "set [view/get/edit] [key] [value]"
};
{'fraction_non_alphanumeric': 0.17591868647380765, 'fraction_numerical': 0.0007818608287724785, 'mean_word_length': 4.13855421686747, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '1596204', 'n_tokens_mistral': 794, 'n_tokens_neox': 788, 'n_words': 231}