Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pacote;
- import javax.security.auth.login.LoginException;
- import net.dv8tion.jda.core.AccountType;
- import net.dv8tion.jda.core.JDA;
- import net.dv8tion.jda.core.JDABuilder;
- import net.dv8tion.jda.core.events.Event;
- import net.dv8tion.jda.core.events.ReadyEvent;
- import net.dv8tion.jda.core.exceptions.RateLimitedException;
- import net.dv8tion.jda.core.hooks.EventListener;
- public class Bote implements EventListener {
- public static void main(String[] args) {
- try {
- JDA jda = new JDABuilder(AccountType.BOT)
- .setToken("t")
- .addEventListener(new Bote())
- .buildBlocking();
- } catch (LoginException | IllegalArgumentException | InterruptedException | RateLimitedException e) {
- e.printStackTrace();
- }
- }
- @Override
- public void onEvent(Event arg0) {
- if (arg0 instanceof ReadyEvent)
- System.out.println("API is ready!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement