Advertisement
Guest User

Part 1 Complete (No userinfo function)

a guest
May 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. const botSettings = require("./botsettings.json");
  2. const Discord = require ("discord.js");
  3. const prefix = botSettings.prefix;
  4.  
  5. const bot = new Discord.Client();
  6.  
  7. bot.on("ready", async () => {
  8. console.log(`${bot.user.username} is ready.`);
  9.  
  10. try {
  11. let link = await bot.generateInvite(["ADMINISTRATOR"]);
  12. console.log(link);
  13. } catch(e) {
  14. console.log(e.stack);
  15. }
  16. });
  17.  
  18. bot.on("message", async message => {
  19. if(message.author.bot) return;
  20. if(message.channel.type === "dm") return;
  21.  
  22. let messageArray = message.content.split(" ");
  23. let command = messageArray[0];
  24. let args = messageArray.slice(1);
  25.  
  26. if(!command.startsWith(prefix)) return;
  27. });
  28.  
  29. bot.login(botSettings.token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement