SHARE
TWEET

Untitled

a guest Jul 19th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2. const token = 'NTk3NTg3ODA1ODI0MDkwMTQy.XSKTVw.FYiYksnXMGgGMdmUaW3euk1HZPA';
  3.  
  4. const client = new Discord.Client();
  5.  
  6. client.on('ready', async () => {
  7.     console.log(`Bot is online!`)
  8. })
  9.  
  10. client.on('message', msg => {
  11.     if(msg.author.bot) return;
  12.    
  13.     const args = msg.content.split(" ");
  14.     const cmd = args[0];
  15.  
  16.     if (cmd === '/my_technologies') {
  17.         function countStars(starsCount) {
  18.             let stars = "";
  19.             let i = 1;
  20.             while (i <= starsCount) {
  21.                 stars = stars.concat("⭐");
  22.                 i++;
  23.             }
  24.             return stars
  25.         }
  26.       const embed = new Discord.RichEmbed()
  27.         .setTitle('My technologies')
  28.         .addField(`${args[1]}`, `${countStars(args[2])}`, true)
  29.         .addField(`${args[3]}`, '⭐⭐⭐⭐⭐', true)
  30.         .addField(`${args[5]}`, '⭐⭐⭐⭐⭐', true)
  31.         .setAuthor(`${msg.author.username}`)
  32.         .setColor('#f50057')
  33.       msg.channel.send(embed);
  34.     }
  35. });
  36.  
  37. client.login(token);
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