package com.blamejared.mcbot.commands;

import com.blamejared.mcbot.commands.api.*;
import com.google.common.collect.Lists;
import sx.blah.discord.handle.obj.IMessage;

import java.util.*;

@Command
public class CommandSlap extends CommandBase {
    private List<String> options = Lists.newArrayList();
    private Random rand = new Random();
    public CommandSlap() {
        super("slap", false);
        options.add(" with a large trout!");
        options.add(" with a big bat!");
        options.add(" with a frying pan!");
        options.add(" like a little bitch!");
    
    
    }
    
    
    @Override
    public void process(IMessage message, List<String> flags, List<String> args) throws CommandException {
        if(args.size() < 1) {
            throw new CommandException("Not enough arguments.");
        }
        
        StringBuilder builder = new StringBuilder(message.getAuthor().getName());
        builder.append(" slapped ").append(args.get(0)).append(options.get(rand.nextInt(options.size())));
        message.getChannel().sendMessage(escapeMentions(builder.toString()));
    }
    
    public String getUsage() {
        return "!slap <user>";
    }
}

@@ -77,16 +77,54 @@
 .api.*;%0A
+import com.google.common.base.Joiner;%0A
 import c
@@ -155,16 +155,17 @@
 .Lists;%0A
+%0A
 import s
@@ -998,18 +998,32 @@
 end(
-args.get(0
+Joiner.on(' ').join(args
 )).a

Use all !slap arguments