updated responsemessages to evaluate own prior responses to new selected responses based on the client

This commit is contained in:
jenzur
2019-04-06 23:58:18 +02:00
parent 376e939980
commit 33ecf7730f
3 changed files with 143 additions and 33 deletions
@@ -33,6 +33,8 @@ import org.javacord.api.entity.user.User;
*/
public class DiscordHandler {
private static String MostRecentMsg = "initial state";
public static void main(String[] args) {
System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "25");
try {
@@ -92,10 +94,11 @@ public class DiscordHandler {
|| event.getServerTextChannel().get().toString().contains("general-autism")) {
String ResponseStr;
try {
ResponseStr = MessageResponseHandler.selectReponseMessage(event.getMessage().toString());
ResponseStr = MessageResponseHandler.selectReponseMessage(event.getMessage().toString(), MostRecentMsg);
if (!ResponseStr.isEmpty()) {
System.out.print("\nResponseStr3: " + ResponseStr + "\n");
event.getChannel().sendMessage(ResponseStr);
MostRecentMsg = ResponseStr;
}
new Thread(() -> {
try {