How to customize your welcome message template discord?

Today, We want to share with you discord welcome message template.In this post we will show you JoinDiscordBot for your discord, hear for put a welcome message on your discord server we will give you demo and example for implement.In this post, we will learn about soundproof with an example.

Setting up Discord welcome message template

Our Index.js file contains the following code.

Read Also:  Angular 6 Responsive Admin Themes & Templates free download

Index.js

const Discord = require('discord.js');
const resources = new Discord.Client();
var prefix = "YOUR_PREFIX";

resources.login('YOUR_TOKEN');

resources.on("ready", () => {
	console.log("[JblusCode] -> You have Enable");
	resources.user.setGame("YOUR_SET_GAME");
});

/*Join*/
resources.on('guildMemberAdd', member =>{
    let embed = new Discord.RichEmbed()
        .setDescription(':tada: **' + member.user.username + '** joined ' + member.guild.name)
        .setFooter('We are now ' + member.guild.memberCount)
    member.guild.channels.get('CHANNEL_ID').send(embed)
});

/*Quit*/
resources.on('guildMemberRemove', member =>{
    let embed = new Discord.RichEmbed()
        .setDescription(':cry: **' + member.user.username + '** left ' + member.guild.name)
        .setFooter('We are now ' + member.guild.memberCount)
    member.guild.channels.get('CHANNEL_ID').send(embed)
 
});

Now follow the bellow steps to get it working.

  • first of all open the index.js main file
  • Update the prefix on line 3
  • and then Import the token of your bot on line 5
  • simple file Edit SetGame on line 9
  • and then Import the id of the join channel on line 17
  • after that Import id of channel left on line 25
  • Now Save the file and close your text editor
  • simple Open the open.bat file now
  • Write in the simple console “node index.js”
  • final Here is your bot as well as opened
Read Also:  AngularJS Confirm Password Validation Example

I hope you get an idea about discord welcome message bot.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Simple jQuery Auto Image Rotator
  2. Read Also:  Laravel 6 Pagination Link Customizations Example
  3. Read Also:  PHP Get HTTP_HOST Name using Laravel Example
  4. Read Also:  How to use multiple databases in Laravel
  5. Read Also:  Ajax Autocomplete Live Search Suggestion using PHP MySQL
  6. Read Also:  How to get all products in WooCommerce
  7. Read Also:  Simple PHP Laravel Pagination script
  8. Read Also:  Angular 6 Responsive Admin Themes & Templates free download
  9. Read Also:  How to use multiple databases in Laravel
  10. Read Also:  Laravel 6 Pagination Link Customizations Example
CLOSEX