<commit_before>var parse = function(uptime){
	var minutes = Math.round(uptime / 60) % 60;
	var hours = Math.round(uptime / 60 / 60) % 24;
	var days = Math.round(uptime / 60 / 60 / 24);
	var seconds = Math.round(uptime) % 60;
	
	uptime = [];
	if (days >= 1) {
		uptime.push('' + days + ' day' + (days > 1 ? 's' : ''));
	}
	if (hours >= 1) {
		uptime.push('' + hours +' hour' + (hours > 1 ? 's' : ''));
	}
	if (minutes >= 1) {
		uptime.push('' + minutes + ' minute' + (minutes > 1 ? 's' : ''));
	}
	if (seconds >= 1) {
		uptime.push('' + seconds + ' second' + (seconds > 1 ? 's' : ''));
	}
	uptime = uptime.join(', ');
	return uptime;
}
var uptime = function(bot, channel){
	var time = (new Date().getTime() - bot.startTime) / 1000;
	IRC.message(channel, 'Bot has been online for: ' + parse(time));
}
exports.init = function(plugins, bot){
	bot.addCommand('uptime', '', 'Shows uptime of bot', USER_LEVEL_GLOBAL, true);
	plugins.listen(this, 'command', function(args){
		if(args.command && args.command == 'uptime'){
			uptime(bot, args.channel);
		}
	});
}<commit_msg>uptime cleanup<commit_after>var parse = function(uptime){
	var minutes = Math.round(uptime / 60) % 60;
	var hours = Math.round(uptime / 60 / 60) % 24;
	var days = Math.round(uptime / 60 / 60 / 24);
	var seconds = Math.round(uptime) % 60;
	
	uptime = [];
	if (days >= 1) {
		uptime.push(days + ' day' + (days > 1 ? 's' : ''));
	}
	if (hours >= 1) {
		uptime.push(hours +' hour' + (hours > 1 ? 's' : ''));
	}
	if (minutes >= 1) {
		uptime.push(minutes + ' minute' + (minutes > 1 ? 's' : ''));
	}
	if (seconds >= 1) {
		uptime.push(seconds + ' second' + (seconds > 1 ? 's' : ''));
	}
	uptime = uptime.join(', ');
	return uptime;
}

exports.init = function(plugins, bot){
	bot.addCommand('uptime', '', 'Shows uptime of bot', USER_LEVEL_GLOBAL, true);
	plugins.listen(this, 'command', function(args){
		if(args.command == 'uptime'){
			var time = (new Date().getTime() - bot.startTime) / 1000;
			IRC.message(args.channel, 'Bot has been online for: ' + parse(time));
		}
	});
}
{'fraction_non_alphanumeric': 0.21638861629048087, 'fraction_numerical': 0.029440628066732092, 'mean_word_length': 3.422993492407809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '85157', 'n_tokens_mistral': 889, 'n_tokens_neox': 790, 'n_words': 190}