=SubCommand Routine modifications

This commit is contained in:
Alex
2019-07-02 01:57:02 -04:00
parent 2ac0ff99ef
commit 2f2474fde8
19 changed files with 239 additions and 159 deletions
+12 -3
View File
@@ -27,8 +27,17 @@ public class SubCommandFramework
public SubCommandFormattable run(KittyGuild guild, KittyChannel channel, KittyUser user, String input)
{
System.out.print(input);
SubCommandFormattable res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" ")));
System.out.println(input);
SubCommandFormattable res = null;
try
{
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" ")));
}
catch(Exception e)
{
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, "");
}
return res;
}
}
}