-
-
Save nkomarn/4b437fd54b40fed74b37412f17ebac41 to your computer and use it in GitHub Desktop.
An update for the bot tutorial (when using JDA 3.8)!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |
I got the same as the guy above me :(
when you add JDA as a dependancy make sure you add the one with inbuild dependancies, https://github.com/DV8FromTheWorld/JDA/releases/download/v4.2.0/JDA-4.2.0_168-withDependencies.jar
i have linked it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
help it says "game string"