pingex
/
DiscordBot
Archived
1
0
Fork 0

Use "```" for command replies, closes #6

master
Pingex aka Raphaël 9 years ago
parent 86ab3f8490
commit a07da9394e

@ -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());