<commit_before>const GReYBot = require('../greybot');

exports.commands = [
	'log',
	'uptime',
	'reload',
	'servers'
]

var startTime = Date.now();

exports.log = {
	usage: '<log message>',
	description: 'logs message to bot console',
	process: (msg, suffix) => { console.log(msg.content); }
}

exports.uptime = {
	usage: '<command>',
	description: 'returns the amount of time since the bot started',
	process: (msg, suffix) => {
		var now = Date.now();
		var msec = now - startTime;
		console.log(`Uptime is ${msec} milliseconds`);
		var days = Math.floor(msec / 1000 / 60 / 60 / 24);
		msec -= days * 1000 * 60 * 60 * 24;
		var hours = Math.floor(msec / 1000 / 60 / 60);
		msec -= hours * 1000 * 60 * 60;
		var mins = Math.floor(msec / 1000 / 60);
		msec -= mins * 1000 * 60;
		var secs = Math.floor(msec / 1000);
		var timestr = "";
		if (days > 0) {
			timestr += `${days} days `;
		}
		if (hours > 0) {
			timestr += `${hours} hours `;
		}
		if (mins > 0) {
			timestr += `${mins} minutes `;
		}
		if (secs > 0) {
			timestr += `${secs} seconds `;
		}
		msg.channel.send({
			embed: {
				color: GReYBot.Config.defaultEmbedColor,
				description: `**Uptime**: ${timestr}`
			}
		});
	}
}

exports.reload = {
	process: (msg) => {
		if (msg.author.hasPermission('ADMINISTRATOR')) {
			require('../lib/commands').init();
			msg.channel.send({
				embed: {
					color: GReYBot.Config.defaultEmbedColor,
					description: 'Reloaded all commands...'
				}
			}).then(message => message.delete(5000));
		} else {
			msg.channel.send({
				embed: {
					color: GReYBot.Config.defaultEmbedColor,
					description: `You can't do that Dave...`
				}
			}).then(message => message.delete(5000));
		}
	}
}

exports.servers = {
	usage: '<command>',
	description: 'Returns a list of servers the bot is connected to',
	process: (msg) => {
		msg.channel.send({
			embed: {
				color: GReYBot.Config.defaultEmbedColor,
				title: GReYBot.Discord.user.username,
				description: `Currently on the following servers:\n\n${GReYBot.Discord.guilds.map(g => `${g.name} - **${g.memberCount} Members**`).join(`\n`)}`
			}
		});
	}
}<commit_msg>Never try to test in prod - #16<commit_after>const GReYBot = require('../greybot');

exports.commands = [
	'log',
	'uptime',
	'reload',
	'servers'
]

var startTime = Date.now();

exports.log = {
	usage: '<log message>',
	description: 'logs message to bot console',
	process: (msg, suffix) => { console.log(msg.content); }
}

exports.uptime = {
	usage: '<command>',
	description: 'returns the amount of time since the bot started',
	process: (msg, suffix) => {
		var now = Date.now();
		var msec = now - startTime;
		console.log(`Uptime is ${msec} milliseconds`);
		var days = Math.floor(msec / 1000 / 60 / 60 / 24);
		msec -= days * 1000 * 60 * 60 * 24;
		var hours = Math.floor(msec / 1000 / 60 / 60);
		msec -= hours * 1000 * 60 * 60;
		var mins = Math.floor(msec / 1000 / 60);
		msec -= mins * 1000 * 60;
		var secs = Math.floor(msec / 1000);
		var timestr = "";
		if (days > 0) {
			timestr += `${days} days `;
		}
		if (hours > 0) {
			timestr += `${hours} hours `;
		}
		if (mins > 0) {
			timestr += `${mins} minutes `;
		}
		if (secs > 0) {
			timestr += `${secs} seconds `;
		}
		msg.channel.send({
			embed: {
				color: GReYBot.Config.defaultEmbedColor,
				description: `**Uptime**: ${timestr}`
			}
		});
	}
}

exports.reload = {
	process: (msg) => {
		if (msg.member.hasPermission('ADMINISTRATOR')) {
			require('../lib/commands').init();
			msg.channel.send({
				embed: {
					color: GReYBot.Config.defaultEmbedColor,
					description: 'Reloaded all commands...'
				}
			}).then(message => message.delete(5000));
		} else {
			msg.channel.send({
				embed: {
					color: GReYBot.Config.defaultEmbedColor,
					description: `You can't do that Dave...`
				}
			}).then(message => message.delete(5000));
		}
	}
}

exports.servers = {
	usage: '<command>',
	description: 'Returns a list of servers the bot is connected to',
	process: (msg) => {
		msg.channel.send({
			embed: {
				color: GReYBot.Config.defaultEmbedColor,
				title: GReYBot.Discord.user.username,
				description: `Currently on the following servers:\n\n${GReYBot.Discord.guilds.map(g => `${g.name} - **${g.memberCount} Members**`).join(`\n`)}`
			}
		});
	}
}
{'fraction_non_alphanumeric': 0.18621013133208256, 'fraction_numerical': 0.03048780487804878, 'mean_word_length': 3.0197926484448634, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 31, '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': '3170512', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1579, 'n_words': 370}