=Bug Fixes

This commit is contained in:
Alex Stewart
2019-07-28 15:18:08 -07:00
parent 3af46e94da
commit 9cc703ab63
5 changed files with 41 additions and 20 deletions
+16 -9
View File
@@ -16,22 +16,29 @@ public class SubCommandAdd extends SubCommand
@Override
public SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input)
{
String role = input.args.split(" ")[0];
if(guild.roleList.contains(role))
String [] roles = input.args.split(",");
String role;
String formatted = "";
for(int i = 0; i < roles.length; i++)
{
if(guild.control.addRole(user.discordID, role))
role = roles[i].trim();
if(guild.roleList.contains(role))
{
return new SubCommandFormattable("ADDED RIN YOU NEED TO FIX THIS");
if(guild.control.addRole(user.discordID, role))
{
formatted += "Addded " + role + "!";
}
else
{
formatted += "Failed to add " + role + "!";
}
}
else
{
return new SubCommandFormattable("FAILED RIN YOU NEED TO FIX THIS TOO");
formatted += "You're not allowed to add " + role + "!";
}
}
else
{
return new SubCommandFormattable("NOT ALLOWED FIX THIS ONE TOO SNEP FACE");
}
return new SubCommandFormattable(formatted);
}
}