<commit_before>const config = require('./config/default.json');
const Discord = require("discord.js");
const client = new Discord.Client();

var version = '1.1';
client.login(config.token); 

client.on("message", msg => 
{
    if (msg.content.startsWith("!<NAME>")) 
	{
		playSound(`sound/akbar1.mp3`, msg);
	}
	
	if (msg.content.startsWith("!TerroristsWin")) 
	{
		playSound(`sound/csgoTerroristsWin.mp3`, msg);
	}
	
	if (msg.content.startsWith("!Genius")) 
	{
		playSound(`sound/genius.mp3`, msg);
	}
	
	if (msg.content.startsWith("!WhoRYou")) 
	{
		playSound(`sound/whoRYou.mp3`, msg);
	}
	
	if (msg.content.startsWith("!ProveIt")) 
	{
		playSound(`sound/proveIt.mp3`, msg);
	}
	
	if (msg.content.startsWith("!UmmmNo")) 
	{
		playSound(`sound/ummmNo.mp3`, msg);
	}
	
	if (msg.content.startsWith("!NotToday")) 
	{
		playSound(`sound/notToday.mp3`, msg);
	}
	
	if (msg.content.startsWith("!Now")) 
	{
		playSound(`sound/now.mp3`, msg);
	}
	
	if (msg.content === '!HelpRiley') {
		listCommands(msg);
		return;
	}
	
	if (msg.content === '!kys') {
		client.destroy();
		return;
	}
});

client.on('ready', () => 
{
	console.log('Rileys Sound v' + version + ' Bot is Running!');
});

function playSound(file, msg) 
{
	const voiceChannel = msg.member.voiceChannel;
	if (voiceChannel != undefined)
	{
		voiceChannel.join().then((connection) => 
		{
			const dispatcher = connection.playFile(file);
			dispatcher.on('end', () => 
			{
				connection.disconnect();
			});
		}).catch((error) => 
		{
			console.log('Error occured!');
			console.log(error);
		});
	}<commit_msg>Changed if/else to switch statements.<commit_after>const config = require('./config/default.json');
const Discord = require("discord.js");
const client = new Discord.Client();

var version = '1.1.2';
client.login(config.token); 

client.on("message", msg => 
{
	if (msg.content.startsWith("!"))
	{
		var command = msg.content.toLowerCase();
		switch (command)
		{
			case ("!allahu akbar"):
				playSound(`sound/akbar1.mp3`, msg);
				break;
			case ("!terroristswin"):
				playSound(`sound/csgoTerroristsWin.mp3`, msg);
				break;
			case ("!genius"):
				playSound(`sound/genius.mp3`, msg);
				break;
			case ("!whoryou"):
				playSound(`sound/whoRYou.mp33`, msg);
				break;
			case ("!proveit"):
				playSound(`sound/proveIt.mp3`, msg);
				break;
			case ("!ummmno"):
				playSound(`sound/ummmNo.mp3`, msg);
				break;
			case ("!nottoday"):
				playSound(`sound/notToday.mp3`, msg);
				break;
			case ("!now"):
				playSound(`sound/now.mp3`, msg);
				break;
			case ("!helpriley"):
				listCommands(msg);
				break;
			case ("!kys"):
				client.destroy();
				break;
			default:
				msg.channel.sendMessage("You clearly have no idea what you are doing.  Here is the list of commands.");
				listCommands(msg);
		}
	}
});

client.on('ready', () => 
{
	console.log('Rileys Sound v' + version + ' Bot is Running!');
});

function playSound(file, msg) 
{
	const voiceChannel = msg.member.voiceChannel;
	if (voiceChannel != undefined)
	{
		voiceChannel.join().then((connection) => 
		{
			const dispatcher = connection.playFile(file);
			dispatcher.on('end', () => 
			{
				connection.disconnect();
			});
		}).catch((error) => 
		{
			console.log('Error occured!');
			console.log(error);
		});
	}
{'fraction_non_alphanumeric': 0.19596453683888718, 'fraction_numerical': 0.007337205747477835, 'mean_word_length': 3.634560906515581, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2424092', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1207, 'n_words': 205}