diff options
Diffstat (limited to 'juick-common/src/main/java/com/juick/server/helpers')
-rw-r--r-- | juick-common/src/main/java/com/juick/server/helpers/CommandResult.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/juick-common/src/main/java/com/juick/server/helpers/CommandResult.java b/juick-common/src/main/java/com/juick/server/helpers/CommandResult.java index 29244115..a772153b 100644 --- a/juick-common/src/main/java/com/juick/server/helpers/CommandResult.java +++ b/juick-common/src/main/java/com/juick/server/helpers/CommandResult.java @@ -2,21 +2,28 @@ package com.juick.server.helpers; import com.juick.Message; +import java.util.Optional; + public class CommandResult { private String text; + private String markdown; private Message newMessage; public String getText() { return text; } + public String getMarkdown() { + return markdown; + } - public Message getNewMessage() { - return newMessage; + public Optional<Message> getNewMessage() { + return Optional.of(newMessage); } - public static CommandResult fromMessage(Message newMessage, String text) { + public static CommandResult build(Message newMessage, String text, String markdown) { CommandResult result = new CommandResult(); result.newMessage = newMessage; result.text = text; + result.markdown = markdown; return result; } public static CommandResult fromString(String text) { |