Skip to content

Commit 49eb54f

Browse files
committed
Log executed commands.
1 parent 438c3f9 commit 49eb54f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/dev/zenith/ppapi/api/PPApiCommandSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ public boolean validateAccountOwner(final CommandContext ctx) {
2121
@Override
2222
public void logEmbed(final CommandContext commandContext, final Embed embed) {
2323
CommandOutputHelper.logEmbedOutputToTerminal(embed);
24+
CommandOutputHelper.logEmbedOutputToDiscord(embed);
2425
}
2526
}

src/main/java/dev/zenith/ppapi/api/PPApiServer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.google.common.cache.CacheBuilder;
66
import com.zenith.Globals;
77
import com.zenith.command.api.CommandContext;
8+
import com.zenith.command.api.CommandOutputHelper;
89
import dev.zenith.ppapi.api.model.ApiErrorResponse;
910
import dev.zenith.ppapi.api.model.PearlLoadRequest;
1011
import dev.zenith.ppapi.api.model.PearlLoadResponse;
@@ -153,6 +154,8 @@ private CommandContext executeCommand(String command) {
153154
LOG.info("PP API executed command: {}", command);
154155
Globals.COMMAND.execute(context);
155156
context.getSource().logEmbed(context, context.getEmbed());
157+
CommandOutputHelper.logMultiLineOutputToTerminal(context.getMultiLineOutput());
158+
CommandOutputHelper.logMultiLineOutputToDiscord(context.getMultiLineOutput());
156159
return context;
157160
}
158161

0 commit comments

Comments
 (0)