<commit_before>const acceptedKeyWords = ['up', 'down', 'max', 'double'];

export default async function volume(ctx) {
	const { message, args } = ctx;
	const arg = args.toLowerCase();

	const max = getMax(this, message.author.id);

	let newVolume = this.vol;

	if (!arg) return;

	const argAsNum = parseInt(arg, 10) / 100;

	if (!acceptedKeyWords.includes(arg) && !argAsNum)
		throw new Error('volume_bad_params');

 	switch (arg) {
 		case 'double':
 			newVolume = 2;
 			break;
 		case 'max':
 			newVolume = 1;
 			break;
 		case 'up':
 			newVolume += 0.1;
 			break;
 		case 'down':
 			newVolume -= 0.1;
 			break;
 		default:
 			newVolume = argAsNum;
 			break;
 	}

 	if (newVolume > max) {
 		message.reply(`I've giv'n her all she's got captain, an' I canna give her no more.`);
 		newVolume = max;
 	}

 	if (newVolume < 0)<commit_msg>Volume stepup to 20% instead of 10%<commit_after>const acceptedKeyWords = ['up', 'down', 'max', 'double'];

const stepUp = 0.2;

export default async function volume(ctx) {
	const { message, args } = ctx;
	const arg = args.toLowerCase();

	const max = getMax(this, message.author.id);

	let newVolume = this.vol;

	if (!arg) return;

	const argAsNum = parseInt(arg, 10) / 100;

	if (!acceptedKeyWords.includes(arg) && !argAsNum)
		throw new Error('volume_bad_params');

 	switch (arg) {
 		case 'double':
 			newVolume = 2;
 			break;
 		case 'max':
 			newVolume = 1;
 			break;
 		case 'up':
 			newVolume += stepUp;
 			break;
 		case 'down':
 			newVolume -= stepUp;
 			break;
 		default:
 			newVolume = argAsNum;
 			break;
 	}

 	if (newVolume > max) {
 		message.reply(`I've giv'n her all she's got captain, an' I canna give her no more.`);
 		newVolume = max;
 	}

 	if (newVolume < 0)
{'fraction_non_alphanumeric': 0.14302125215393452, 'fraction_numerical': 0.014933946008041356, 'mean_word_length': 3.0606060606060606, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '743893', 'n_tokens_mistral': 753, 'n_tokens_neox': 646, 'n_words': 182}