So Im trying to add the bot if i get messaged 1234 but when i check for 1234 it goes straight to else and the log of the text i checked for says 1234.
public void onMessage(Message message) throws InterruptedException {
if(message.getType() == Message.MessageType.GAME){
Integer text = Integer.parseInt(message.getMessage());
if(text == 1234) {
AddFriend(message.getUsername());
} else {
log(text);
}
}
}
//Also tried this for line 3 and 4.
Integer text = message.getMessage();
if(text == "1234") {