Yarrmor
Aug 30, 2017, 10:16:34 PM8/30/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pircbotx
I'm getting the following error when I try to run it:
I did change the 3 static strings in my code. But, idk how to resolve the error message. I followed the docs.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Lists
at org.pircbotx.Configuration$Builder.[Configuration.java:318]
at Main.main[Main.java:14]
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Lists
at java.net.URLClassLoader.findClass[URLClassLoader.java:381]
at java.lang.ClassLoader.loadClass[ClassLoader.java:424]
at sun.misc.Launcher$AppClassLoader.loadClass[Launcher.java:335]
at java.lang.ClassLoader.loadClass[ClassLoader.java:357]
... 2 more
at org.pircbotx.Configuration$Builder.[Configuration.java:318]
at Main.main[Main.java:14]
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Lists
at java.net.URLClassLoader.findClass[URLClassLoader.java:381]
at java.lang.ClassLoader.loadClass[ClassLoader.java:424]
at sun.misc.Launcher$AppClassLoader.loadClass[Launcher.java:335]
at java.lang.ClassLoader.loadClass[ClassLoader.java:357]
... 2 more
This is my current Main.java:
import org.pircbotx.Configuration;
import org.pircbotx.PircBotX;
import org.pircbotx.cap.EnableCapHandler;
public class Main {
public static final String BOTNAME = "BotName";
public static final String OAUTH = "OAUTH";
public static final String CHANNEL = "BotName";
public static PircBotX bot;
public static void main[String[] args] throws Exception {
Configuration config = new Configuration.Builder[]
.setAutoNickChange[false] //Twitch doesn't support multiple users
.setOnJoinWhoEnabled[false] //Twitch doesn't support WHO command
.setCapEnabled[true]
.addCapHandler[new EnableCapHandler["twitch.tv/membership"]] //Twitch by default doesn't send JOIN, PART, and NAMES unless you request it, see //github.com/justintv/Twitch-API/blob/master/IRC.md#membership
.addServer["irc.twitch.tv"]
.setName[BOTNAME] //Your twitch.tv username
.setServerPassword[OAUTH] //Your oauth password from //twitchapps.com/tmi
.addAutoJoinChannel["#"+CHANNEL]
.buildConfiguration[]; //Some twitch channel
//.addListener[new MyListener[]]
bot = new PircBotX[config];
bot.startBot[];
}
}
import org.pircbotx.PircBotX;
import org.pircbotx.cap.EnableCapHandler;
public class Main {
public static final String BOTNAME = "BotName";
public static final String OAUTH = "OAUTH";
public static final String CHANNEL = "BotName";
public static PircBotX bot;
public static void main[String[] args] throws Exception {
Configuration config = new Configuration.Builder[]
.setAutoNickChange[false] //Twitch doesn't support multiple users
.setOnJoinWhoEnabled[false] //Twitch doesn't support WHO command
.setCapEnabled[true]
.addCapHandler[new EnableCapHandler["twitch.tv/membership"]] //Twitch by default doesn't send JOIN, PART, and NAMES unless you request it, see //github.com/justintv/Twitch-API/blob/master/IRC.md#membership
.addServer["irc.twitch.tv"]
.setName[BOTNAME] //Your twitch.tv username
.setServerPassword[OAUTH] //Your oauth password from //twitchapps.com/tmi
.addAutoJoinChannel["#"+CHANNEL]
.buildConfiguration[]; //Some twitch channel
//.addListener[new MyListener[]]
bot = new PircBotX[config];
bot.startBot[];
}
}