|
|
|
@ -153,7 +153,7 @@ class CommandDispatcher
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
String ans = (String) commandList.get(finalFullCommand).invoke(finalParsedArray);
|
|
|
|
|
if(ans != null) event.getMessage().reply(ans);
|
|
|
|
|
if(ans != null) event.getMessage().getChannel().sendMessage("```\n" + ans + "\n```");
|
|
|
|
|
} catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e)
|
|
|
|
|
{
|
|
|
|
|
logger.severe("Couldn't call target method (" + e.getClass().getName() + "): " + e.getMessage());
|
|
|
|
@ -170,7 +170,7 @@ class CommandDispatcher
|
|
|
|
|
else // Error answer
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
event.getMessage().reply(commandAnswer);
|
|
|
|
|
event.getMessage().getChannel().sendMessage("```\n" + commandAnswer + "\n```");
|
|
|
|
|
} catch (MissingPermissionsException | HTTP429Exception | DiscordException e)
|
|
|
|
|
{
|
|
|
|
|
logger.warning("Couldn't reply to command (" + e.getClass().getName() + "): " + e.getMessage());
|
|
|
|
|