|
|
@ -154,7 +154,7 @@ class CommandDispatcher
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
String ans = (String) commandList.get(finalFullCommand).invoke(finalParsedArray);
|
|
|
|
String ans = (String) commandList.get(finalFullCommand).invoke(finalParsedArray);
|
|
|
|
if(ans != null) event.getMessage().getChannel().sendMessage("```\n" + ans + "\n```");
|
|
|
|
if(ans != null) event.getMessage().getChannel().sendMessage(commandList.get(finalFullCommand).getMethod().getAnnotation(Command.class).codeOutput() ? "```\n" + ans + "\n```" : ans);
|
|
|
|
} catch (IllegalArgumentException | IllegalAccessException e)
|
|
|
|
} catch (IllegalArgumentException | IllegalAccessException e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.severe("Couldn't call target method (" + e.getClass().getName() + "): " + e.getMessage());
|
|
|
|
logger.severe("Couldn't call target method (" + e.getClass().getName() + "): " + e.getMessage());
|
|
|
|