text: const { inspect } = require("util");
  
  // This command is to modify/edit guild configuration. Perm Level 3 for admins
  // and owners only. Used for changing prefixes and role names and such.
  
  // Note that there's no "checks" in this basic version - no config "types" like
  // Role, String, Int, etc... It's basic, to be extended with your deft hands!
  
  // Note the **destructuring** here. instead of `args` we have :
  // [action, key, ...value]
  // This gives us the equivalent of either:
  // const action = args[0]; const key = args[1]; const value = args.slice(2);
  // OR the same as:
  // const [action, key, ...value] = args;
  exports.run = async (client, message, [action, key, ...value], level) => { // eslint-disable-line no-unused-vars
    
    // Retrieve current guild settings
    const settings = message.settings;
    const defaults = client.settings.get("default");
    
    // Secondly, if a user does `-set edit <key> <new value>`, let's change it
    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.length < 1) 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.join(" ")}`);
    } else
    
    // Thirdly, if a user does `-set del <key>`, let's ask the user if they're sure...
    if (action === "del" || action === "reset") {
      if (!key) return message.reply("Please specify a key to delete (reset).");
      if (!settings[key]) return message.reply("This key does not exist in the settings");
      
      // Throw the 'are you sure?' text at them.
      const response = await client.awaitReply(message, `Are you sure you want to reset \`${key}\` to the default \`${defaults[key]}\`?`);
  
      // If they respond with y or yes, continue.
      if (["y", "yes"].includes(response)) {
  
        // We delete the `key` here.
        delete settings[key];
        client.settings.set(message.guild.id, settings);
        message.reply(`${key} was successfully deleted.`);
      } else
      // If they respond with n or no, we inform them that the action has been cancelled.
      if (["n","no","cancel"].includes(response)) {
        message.reply(`Your setting for \`${key}\` remains at \`${settings[key]}\``);
      }
    } else
    
    // Using `-set get <key>` we simply return the current value for the guild.
    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]}`);
    
    // Otherwise, the default action is to return the whole configuration in JSON format (to be prettified!);
    } else {
      await message.channel.send(`***__Current Guild Settings__***\n\`\`\`json\n${inspect(settings)}\n\`\`\``);
      message.channel.send(`See the Dashboard on <${client.config.dashboard.callbackURL.split("/").slice(0, -1).join("/")}>`);
    }
  };
  
  exports.conf = {
    enabled: true,
    guildOnly: true,
    aliases: ["setting", "settings"],
    permLevel: "Administrator"
  };
  
  exports.help = {
    name: "set",
    category: "System",
    description: "View or change settings for your server.",
    usage: "set <view/get/edit> <key> <value>"
  };
  