Advertisement
Evyatar12

discord bot

Jan 27th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. package me.evy.bot;
  2.  
  3. import javax.security.auth.login.LoginException;
  4.  
  5. import net.dv8tion.jda.bot.JDABot;
  6. import net.dv8tion.jda.core.AccountType;
  7. import net.dv8tion.jda.core.JDA;
  8. import net.dv8tion.jda.core.JDABuilder;
  9. import net.dv8tion.jda.core.OnlineStatus;
  10. import net.dv8tion.jda.core.Permission;
  11. import net.dv8tion.jda.core.entities.Game;
  12.  
  13. public class Main {
  14.    
  15.     public static final String BOT_TOKEN = "TOKEN";
  16.    
  17.     public static void main(String[] args) throws LoginException, InterruptedException {
  18.         JDABuilder builder = new JDABuilder(AccountType.BOT).
  19.                 setToken(BOT_TOKEN).
  20.                 addEventListener(new MessageListener()).
  21.                 setStatus(OnlineStatus.DO_NOT_DISTURB).
  22.                 setGame(Game.watching("your mom stripping"));
  23.         JDA jda = builder.buildBlocking();
  24.  
  25.         JDABot bot = jda.asBot();
  26.         System.out.println(bot.getInviteUrl(Permission.getPermissions(Permission.ALL_PERMISSIONS)));
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement