@@ -0,0 +1,1190 @@
+package me.wyvernix.sadbot.Commands;%0A%0Aimport java.util.ArrayList;%0A%0Aimport me.wyvernix.sadbot.Bots.MasterBot;%0A%0Apublic class RaffleCommand implements BotCommand %7B%0A%0A%09@Override%0A%09public String getCommandName() %7B%0A%09%09return %22raffle%22;%0A%09%7D%0A%0A%09@Override%0A%09public void handleMessage(MasterBot bot, String channel, String sender, String message) %7B%0A%09%09String winner = %22cake%22;%0A%09%09%0A%09%09ArrayList%3CString%3E users = bot.getActiveUsers();%0A%09%09final ArrayList%3CString%3E mods = bot.getMods();%0A%09%09%0A%09%09users.remove(channel.replaceFirst(%22#%22, %22%22)); //remove broadcaster%0A%09%09users.remove(bot.botName.toLowerCase()); //remove bot%0A%09%09%0A%09%09if (!message.contains(%22mods%22)) %7B //remove mods unless told not to%0A%09%09%09for (int i = 0; i %3C mods.size(); i++) %7B%0A%09%09%09%09users.remove(mods.get(i));%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09if (users.size() %3E 0) %7B%0A%09%09%09winner = users.get((int)(Math.random() * ((users.size() - 1) + 1)));%0A%09%09%09%0A//%09%09%09bot.userStats.addWin(winner); //why do i track this? oh right. in case i ever add a trigger for no rerolls.%0A%09%09%09%0A%09%09%09bot.sendMessage(channel, winner + %22 is winrar!%22);%0A%09%09%7D else %7B //all users are mods, so no winner%0A%09%09%09bot.sendMessage(channel, %22cake is winrar! uhh... ok then. go cake. (mods are excluded unless use' mods' modifier)%22);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add raffle command