/*
 * choose.js - Make the bot choose your stupid life decisions.
 *
 * Contributed by Capuccino and Ovyerus
 */

/* eslint-env node */

exports.commands = [
    'choose'
];

exports.choose = {
    desc: "Randomly chooses between 2 or more arguments.",
    fullDesc: 'Uses a randomiser to pick a random value out of two given arguments.',
    usage: '<choice1> <choice2>',
    example: '"coke zero" coke',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            if (ctx.args < 2) {
                ctx.createMessage(localeManager.t('choose-insufficientArgs', ctx.settings.locale));
            } else {
                let choice = ctx.args[Math.floor(Math.random() * ctx.args.length)];
                ctx.createMessage(localeManager.t('choose', ctx.settings.locale, {name: ctx.author.mention, choice})).then(resolve).catch(reject);
            }
        });
    }
};
@@ -486,20 +486,78 @@
     
-if (ctx.args
+let choices = ctx.suffix.split(' or ');%0A            if (choices.length
  %3C 2
@@ -572,32 +572,44 @@
             ctx.
+msg.channel.
 createMessage(lo
@@ -670,16 +670,44 @@
 locale))
+.then(resolve).catch(reject)
 ;%0A      
@@ -733,27 +733,27 @@
             
-let
+var
  choice = ct
@@ -751,22 +751,21 @@
 oice = c
-tx.arg
+hoice
 s%5BMath.f
@@ -790,14 +790,13 @@
  * c
-tx.arg
+hoice
 s.le
@@ -823,16 +823,28 @@
     ctx.
+msg.channel.
 createMe
@@ -911,22 +911,27 @@
 ctx.
+msg.
 author.
-mention
+username
 , ch

revert choose back to memes