29 lines
973 B
Java
29 lines
973 B
Java
|
|
import net.dv8tion.jda.api.JDABuilder;
|
|
import net.dv8tion.jda.api.entities.TextChannel;
|
|
|
|
import javax.security.auth.login.LoginException;
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
import listeners.MinecraftEventListener;
|
|
|
|
public class disMCbot {
|
|
private static TextChannel updateChannel;
|
|
private static final Logger logger = LogManager.getLogger(disMCbot.class);
|
|
|
|
public static void main(String[] args) throws LoginException {
|
|
logger.info("Starting Discord Bot...");
|
|
String token = "MTIyNjY1NTgxODU0NDMxNjQxNw.GXAYvx.m2_ZmH-J5-iGhqdkW3M2VViG1wBQguKq-OjN80";
|
|
JDABuilder builder = JDABuilder.createDefault(token);
|
|
builder.addEventListeners(new MinecraftEventListener(updateChannel));
|
|
builder.build();
|
|
}
|
|
|
|
public void setUpdateChannel(TextChannel channel) {
|
|
disMCbot.updateChannel = channel;
|
|
}
|
|
|
|
// Other methods and event listeners can be added as needed
|
|
} |