added error message logging to reaction post execution

added validation to post target command
added templates for post target command
moved ping and echo model to interface
added show emote command
This commit is contained in:
Sheldan
2020-03-22 12:34:52 +01:00
parent d95382b589
commit 8cd9068cfc
32 changed files with 154 additions and 17 deletions

View File

@@ -13,6 +13,9 @@ public class ReactionPostExecution implements PostCommandExecution {
public void execute(CommandContext commandContext, Result result, Command command) {
if(result.getResult().equals(ResultState.ERROR)) {
commandContext.getMessage().addReaction("⚠️").queue();
if(result.getMessage() != null && result.getThrowable() == null){
commandContext.getChannel().sendMessage(result.getMessage()).queue();
}
} else {
if(command.getConfiguration().isCausesReaction()){
commandContext.getMessage().addReaction("").queue();