<commit_before>const Discord = require('discord.js');
const path = require('path');
const now = require('performance-now');
const CommandMessage = require('./structures/commandMessage');
const ArgResolver = require('./parsers/argResolver');
const PermLevels = require('./util/PermLevels');
const util = require('./util/util');
const SettingGateway = require('./settings/settingGateway');
const CommandStore = require('./stores/CommandStore');
const InhibitorStore = require('./stores/InhibitorStore');
const FinalizerStore = require('./stores/FinalizerStore');
const MonitorStore = require('./stores/MonitorStore');
const ProviderStore = require('./stores/ProviderStore');
const EventStore = require('./stores/EventStore');
const ExtendableStore = require('./stores/ExtendableStore');

/**
 * The client for handling everything. See {@tutorial GettingStarted} for more information how to get started using this class.
 * @extends external:Client
 * @tutorial GettingStarted
 */
class KlasaClient extends Discord.Client {

	/**
	 * @typedef {Object} KlasaClientConfig
	 * @property {DiscordJSConfig} clientOptions The options to pass to D.JS
	 * @property {string} prefix The default prefix the bot should respond to
	 * @property {number} [commandMessageLifetime=1800] The threshold for how old command messages can be before sweeping since the last edit in seconds
	 * @property {number} [commandMessageSweep=900] The interval duration for which command messages should be sweept in seconds
	 * @property {object} [provider] The provider to use in Klasa
	 * @property {boolean} [disableLogTimestamps=false] Whether or not to disable the log timestamps
	 * @property {boolean} [disableLogColor=false] Whether or not to disable the log colors
	 * @property {boolean} [ignoreBots=true] Whether or not this bot should ignore other bots
	 * @property {boolean} [ignoreSelf=true] Whether or not this bot should ignore itself
	 * @property {RegExp} [prefixMention] The prefix mention for your bot (Automatically Generated)
	 * @property {boolean} [cmdPrompt=false] Whether the bot should prompt missing parameters
	 * @property {boolean} [cmdEditing=false] Whether the bot should update responses if the command is edited
	 * @property {string} [ownerID] The discord user id for the user the bot should respect as the owner (gotten from Discord api if not provided)
	 */

	/**
	 * @param {KlasaClientConfig} config The config to pass to the new client
	 */
	constructor(config = {}) {
		if (typeof config !== 'object') throw new TypeError('Configuration for Klasa must be an object.');
		super(config.clientOptions);

		/**
		 * The config passed to the new Klasa.Client
		 * @type {KlasaClientConfig}
		 */
		this.config = config;
		this.config.provider = config.provider || {};

		/**
		 * The directory to the node_modules folder where Klasa exists
		 * @type {string}
		 */
		this.coreBaseDir = path.join(__dirname, '../');

		/**
		 * The directory where the user files are at
		 * @type {string}
		 */
		this.clientBaseDir = process.cwd();

		/**
		 * The argument resolver
		 * @type {ArgResolver}<commit_msg>make the clientBaseDir set-able<commit_after>const Discord = require('discord.js');
const path = require('path');
const now = require('performance-now');
const CommandMessage = require('./structures/commandMessage');
const ArgResolver = require('./parsers/argResolver');
const PermLevels = require('./util/PermLevels');
const util = require('./util/util');
const SettingGateway = require('./settings/settingGateway');
const CommandStore = require('./stores/CommandStore');
const InhibitorStore = require('./stores/InhibitorStore');
const FinalizerStore = require('./stores/FinalizerStore');
const MonitorStore = require('./stores/MonitorStore');
const ProviderStore = require('./stores/ProviderStore');
const EventStore = require('./stores/EventStore');
const ExtendableStore = require('./stores/ExtendableStore');

/**
 * The client for handling everything. See {@tutorial GettingStarted} for more information how to get started using this class.
 * @extends external:Client
 * @tutorial GettingStarted
 */
class KlasaClient extends Discord.Client {

	/**
	 * @typedef {Object} KlasaClientConfig
	 * @property {DiscordJSConfig} clientOptions The options to pass to D.JS
	 * @property {string} prefix The default prefix the bot should respond to
	 * @property {string} [clientBaseDir=process.cwd()] The directory where all piece folders can be found
	 * @property {number} [commandMessageLifetime=1800] The threshold for how old command messages can be before sweeping since the last edit in seconds
	 * @property {number} [commandMessageSweep=900] The interval duration for which command messages should be sweept in seconds
	 * @property {object} [provider] The provider to use in Klasa
	 * @property {boolean} [disableLogTimestamps=false] Whether or not to disable the log timestamps
	 * @property {boolean} [disableLogColor=false] Whether or not to disable the log colors
	 * @property {boolean} [ignoreBots=true] Whether or not this bot should ignore other bots
	 * @property {boolean} [ignoreSelf=true] Whether or not this bot should ignore itself
	 * @property {RegExp} [prefixMention] The prefix mention for your bot (Automatically Generated)
	 * @property {boolean} [cmdPrompt=false] Whether the bot should prompt missing parameters
	 * @property {boolean} [cmdEditing=false] Whether the bot should update responses if the command is edited
	 * @property {string} [ownerID] The discord user id for the user the bot should respect as the owner (gotten from Discord api if not provided)
	 */

	/**
	 * @param {KlasaClientConfig} config The config to pass to the new client
	 */
	constructor(config = {}) {
		if (typeof config !== 'object') throw new TypeError('Configuration for Klasa must be an object.');
		super(config.clientOptions);

		/**
		 * The config passed to the new Klasa.Client
		 * @type {KlasaClientConfig}
		 */
		this.config = config;
		this.config.provider = config.provider || {};

		/**
		 * The directory to the node_modules folder where Klasa exists
		 * @type {string}
		 */
		this.coreBaseDir = path.join(__dirname, '../');

		/**
		 * The directory where the user files are at
		 * @type {string}
		 */
		this.clientBaseDir = config.clientBaseDir || process.cwd();

		/**
		 * The argument resolver
		 * @type {ArgResolver}
{'fraction_non_alphanumeric': 0.11090166509582156, 'fraction_numerical': 0.002199183160540371, 'mean_word_length': 4.705197132616488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2310666', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1649, 'n_words': 637}