SHARE
TWEET

Color Code

iiDarkGamerYT Jul 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('message', message => {
  2.           let messageArray = message.content.split(" ");
  3.     let args = messageArray[1]
  4.    if(message.content.startsWith (prefix + 'color')) {
  5.        if (!args) return message.channel.send(`:rolling_eyes: Please choose color number`);
  6.            const embedd = new Discord.RichEmbed()
  7.      .setFooter('Requested by '+message.author.username, message.author.avatarURL)
  8.    .setTitle(`Wrong color number`)
  9.    .setColor(`BLACK`)
  10.  
  11.     if(!isNaN(args) && args.length > 0)
  12.    
  13.  
  14. if (!(message.guild.roles.find("name",`${args}`))) return  message.channel.sendEmbed(embedd);
  15.  
  16.  
  17.        var a = message.guild.roles.find("name",`${args}`)
  18.                 if(!a)return;
  19. const embed = new Discord.RichEmbed()
  20.                    
  21.      .setFooter('Requested by '+message.author.username, message.author.avatarURL)
  22.    .setTitle(`Color has been changed successfully.`)
  23.  
  24.    .setColor(`${a.hexColor}`)
  25.   message.channel.sendEmbed(embed);
  26.           if (!args)return;
  27. setInterval(function(){})
  28.                   let count = 0;
  29.                   let ecount = 0;
  30.         for(let x = 1; x < 201; x++){
  31.            
  32.             message.member.removeRole(message.guild.roles.find("name",`${x}`))
  33.          
  34.             }
  35.                 message.member.addRole(message.guild.roles.find("name",`${args}`));
  36.        
  37.            
  38.     }
  39. });
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