Skip to content

Instantly share code, notes, and snippets.

@nkomarn nkomarn/JDA 3.8 Updates Secret
Created Feb 2, 2019

Embed
What would you like to do?
An update for the bot tutorial (when using JDA 3.8)!
package techtoolbox.Bot;
import javax.security.auth.login.LoginException;
import net.dv8tion.jda.core.JDABuilder;
import net.dv8tion.jda.core.OnlineStatus;
import net.dv8tion.jda.core.entities.Game;
import techtoolbox.Bot.events.GuildMessageReceived;
public class Bot {
public static String prefix = "~";
public static void main(String[] args) throws LoginException {
JDABuilder builder = new JDABuilder();
builder.setToken("Your token goes here.");
builder.setStatus(OnlineStatus.ONLINE);
builder.setGame(Game.playing("boring comedy shows."));
// Register listeners
builder.addEventListener(new GuildMessageReceived());
builder.build();
}
}
You can’t perform that action at this time.