=More SubCommand Routine Mods
This commit is contained in:
@@ -46,7 +46,7 @@ public abstract class SubCommand
|
||||
protected final SubCommandFormattable Invoke(KittyGuild guild, KittyChannel channel, KittyUser user, String input)
|
||||
{
|
||||
if(!CanCall(guild, channel, user))
|
||||
return null;
|
||||
return new SubCommandFormattable("Can't run that!");
|
||||
|
||||
return OnRun(guild, channel, user, input);
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ public class SubCommandFramework
|
||||
SubCommandFormattable res = null;
|
||||
try
|
||||
{
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" ")));
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).Invoke(guild, channel, user, input.substring(input.indexOf(" ")));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, "");
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).Invoke(guild, channel, user, "");
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user