jensie1996

Discord v13 Role bij level

Jan 26th, 2022 (edited)
1,305
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (levelFile[idUser].level == 5) {
  2.     var role = message.guild.roles.cache.find(r => r.name === "YT");
  3.  
  4.     var member = message.member;
  5.     member.roles.add(role);
  6.  
  7.     var embedLevel = new MessageEmbed()
  8.         .setDescription("***Nieuwe rang & level hoger***")
  9.         .setColor("#00ff00")
  10.         .addField("Nieuwe rang: ", "YT")
  11.         .addField("Nieuw level: ", levelFile[idUser].level.toString());
  12.     message.channel.send({ embeds: [embedLevel] });
  13.  
  14. } else {
  15.     var embedLevel = new MessageEmbed()
  16.         .setDescription("***Level hoger***")
  17.         .setColor("#00ff00")
  18.         .addField("Nieuw level: ", levelFile[idUser].level.toString());
  19.     message.channel.send({ embeds: [embedLevel] });
  20. }
RAW Paste Data Copied