Advertisement
Panqueca

Noooo

Jul 3rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. package pacote;
  2.  
  3. import javax.security.auth.login.LoginException;
  4.  
  5. import net.dv8tion.jda.core.AccountType;
  6. import net.dv8tion.jda.core.JDA;
  7. import net.dv8tion.jda.core.JDABuilder;
  8. import net.dv8tion.jda.core.events.Event;
  9. import net.dv8tion.jda.core.events.ReadyEvent;
  10. import net.dv8tion.jda.core.exceptions.RateLimitedException;
  11. import net.dv8tion.jda.core.hooks.EventListener;
  12.  
  13.  
  14. public class Bote implements EventListener {
  15.  
  16. public static void main(String[] args) {
  17.  
  18. try {
  19.  
  20. JDA jda = new JDABuilder(AccountType.BOT)
  21. .setToken("t")
  22. .addEventListener(new Bote())
  23. .buildBlocking();
  24. } catch (LoginException | IllegalArgumentException | InterruptedException | RateLimitedException e) {
  25.  
  26. e.printStackTrace();
  27. }
  28.  
  29.  
  30. }
  31.  
  32. @Override
  33. public void onEvent(Event arg0) {
  34. if (arg0 instanceof ReadyEvent)
  35. System.out.println("API is ready!");
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement