Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const client = new Discord.Client();
- const Discord = require('discord.js');
- const token = 'NjcxNDg3NjQwODcyMjg4MjY2.XjCI3w.gHrpUIkH_PRuJ29W8Q8Zm-63_1Q';
- client.on('ready', () =>{
- console.log('Discord Client is Online')
- Client.on('guildMemberAdd', member => {
- const channel = member.guild.channels.find(ch => ch.name === 'welcome')
- // Change 'Channel-Name' to whatever channel you want the welcome message to be in!
- const embed = new RichEmbed()
- //This is where you start writing your embed, I will include as many features as I can in this!
- .setAuthor("Welcome Bot")
- .setTitle(`Welcome to <name>, Official Discord, ${member.displayName}!`)//This will be the second line below .setAuthor, This will say "Welcome to *Server Name*, *Name of person who joined*"
- .setColor('#cc0000')//This is the color of the bar that is going to be on your embed, You only want to change the part after `0x`. The Colors are in Hex code. If I were to change it from the Coral Red to Teal i would change it from .setColor(0xF08080) to .setColor(0x008080)
- .setDescription(`Welcome to <server>, ${member.displayName}`)//This a gray box that would be like normal discord text, You can use the markup language like ```Message``` or ``Message``, ectetera
- .setURL()//When you have this set, You can click on the .setTitle & it will take you to the link set!
- .setImage('')
- //)//This is going to be the Image underneath the Embed, I'm going to be using an example image for this Embed, Give me a second to check my files..
- .addBlankField(true)//This line is a boolean so it's either ``true`` or ``false``, If you dont want the blank field, Just remove the line.
- if (!channel) { return } else {//This is basically saying: If it finds ch.name
- channel.send({embed})//it will return with this embed
- }});
- })
- client.login(token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement