/*
	Miscellaneous commands
*/

Settings.addPermissions(['pick', 'randomanswer']);

exports.commands = {
	choose: 'pick',
	pick: function (arg, by, room, cmd) {
		var choices = arg.split(",");
		choices = choices.filter(function (i) {return (toId(i) !== '');});
		if (choices.length < 2) return this.pmReply(this.trad('err'));
		var choice = choices[Math.floor(Math.random() * choices.length)];
		if (!this.can('pick') || this.roomType === 'pm') {
			this.pmReply(Tools.stripCommands(choice));
		} else {
			this.reply(Tools.stripCommands(choice));
		}
	},

	'8ball': 'randomanswer',
	helix: 'randomanswer',
	randomanswer: function (arg, user, room) {
		if (room === user) return false;
		var text = '';
		var rand = ~~(20 * Math.random());
		var answers = this.trad('answers');
		text += (answers[rand] || answers[0]);
		this.restrictReply(text, 'randomanswer');
	}
};

@@ -71,16 +71,33 @@
 manswer'
+, 'usage', 'help'
 %5D);%0A%0Aexp
@@ -873,14 +873,335 @@
 swer');%0A
+%09%7D,%0A%0A%09usagestats: 'usage',%0A%09usage: function (arg, user, room) %7B%0A%09%09this.restrictReply('http://www.smogon.com/stats/', 'usage');%0A%09%7D,%0A%0A%09guide: 'help',%0A%09botguide: 'help',%0A%09help: function (arg, user, room) %7B%0A%09%09this.restrictReply('https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot/blob/master/commands/README.md', 'help');%0A
 %09%7D%0A%7D;%0A

Add usage and help commands