Skip to content

Commit

Permalink
Add support for emotes and URLs from Mixer to IRC.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobgkau committed Apr 20, 2020
1 parent 5dceac7 commit 6687592
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/nots/beambridge/beambridge/MixerBot.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.nots.beambridge.beambridge;

import java.util.concurrent.ExecutionException;
import java.util.regex.Pattern;

import org.pircbotx.hooks.ListenerAdapter;
import com.mixer.api.MixerAPI;
Expand Down Expand Up @@ -116,7 +117,11 @@ public void onFailure(Throwable var1) {
} */

// Assign the Mixer data to variables.
String messageFromMixer = event.data.message.message.get(0).text;
String messageFromMixer = "";
int messageComponentLength = event.data.message.message.size(); // Emotes, URLs, etc will split the message into multiple components.
for (int i = 0; i < messageComponentLength; i++) { // Add each component's text to the IRC message in order.
messageFromMixer = messageFromMixer + event.data.message.message.get(i).text;
}
String sendingMixerUser = event.data.userName;
System.out.println("Mixer message received: " + messageFromMixer); // Print message from Mixer to console.

Expand Down

0 comments on commit 6687592

Please sign in to comment.