SHARE
TWEET

Untitled

a guest Jul 18th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const discord = require("discord.js");
  2. const botConfig = require ("./botconfig.json");
  3.  
  4. const bot = new discord.Client ();
  5.  
  6. bot.on("ready", async () => {
  7.  
  8.     console.log(`${bot.user.username} is online!`)
  9.  
  10.     bot.user.setActivity("TCV - Helper", {type:"PLAYING"});
  11. })
  12.  
  13.  
  14. bot.login(botConfig.token);
  15.  
  16.  
  17.  
  18. bot.on("guildMemberAdd", member => {
  19.  
  20. var role = member.guild.roles.find("name", "TCV - Klant");
  21.  
  22. if (!role) return;
  23.  
  24. member.addRole(role);
  25.  
  26. const channel = member.guild.channels.find("name", "welkom");
  27.  
  28. if (!channel) return;
  29.  
  30. channel.send(`Welkom ${member}! Dit is de officieƫle discordserver van veiling The City.`);
  31.  
  32. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top