This is my third time trying to develop a personal bot for my channel using pircbot in Java, and each time I encounter an error from the client, saying “Login Authentication Failed,” then I am disconnected. I know I am only supposed to get that error if the oauth is incorrect, but I have regenerated it several times to no avail. This is the code I have:
public class camelMain extends PircBot
{
public static String CHANNEL = //channelname;
public static String NICK = //botname;
public static String PASS = //oauth:etcetc;
public static int PORT = 6667;
public static String SERVERNAME = "irc.chat.twitch.tv";
public static void main(String args[])
{
camelBot camel = new camelBot();
camel.setVerbose(true);
try {
System.out.println("Attempting to join server");
camel.connect(SERVERNAME, PORT, PASS);
}
catch (NickAlreadyInUseException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
catch (IrcException e) {
e.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}
if (camel.isConnected())
{
System.out.println("Connected to " + SERVERNAME + " Successfully!");
}
else
{
System.out.println("Connection Failed");
}
}
}
Thanks for any help! If any more info is needed, I’ll be happy to provide it.
EDIT: I do connect to the server, but I am disconnected once it says that the login authentication failed.