updated responsemessages to evaluate own prior responses to new selected responses based on the client
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user