Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. const Discord = require('discord.js');
  2. const client = new Discord.Client();
  3.  
  4.  
  5. client.on('ready', () => {
  6. console.log(`Logged in as ${client.user.tag}!`);
  7. });
  8.  
  9. const myDiscriminator = ["2019", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "0008", "0009", "1337"]; // هنا التقات الي انتا عوزها
  10. const bot = new(require("discord.js")).Client({fetchAllMembers: true});
  11.  
  12. const password = ""; // بسورد حسابك
  13. const token = ""; //توكن هنا
  14.  
  15. bot.login(token);
  16.  
  17. function changeDiscriminator() {
  18. if (myDiscriminator.includes(bot.user.discriminator.toString()))
  19. return console.log("Discriminator Loaded: " + bot.user.discriminator);
  20. try {
  21. const us = bot.users.find(u => u.discriminator === bot.user.discriminator && u.username !== bot.user.username && !u.bot).username;
  22. console.log(Date.now(), "Username Loaded: " + us);
  23. bot.user.setUsername(us, password).then((u) => {
  24. console.log(Date.now(), "Username: " + u.username, "Discriminator: " + u.discriminator);
  25. setTimeout(changeDiscriminator, 8640 * 10000);
  26. }).catch((err) => {
  27. console.log(Date.now(), "An error occurred. Trying again in sixty (60) seconds.");
  28. setTimeout(changeDiscriminator, 60 * 1e3);
  29. });
  30. } catch(e) {
  31. console.log(Date.now(), `[${e}] Trying again in 30 seconds.`);
  32. setTimeout(changeDiscriminator, 30 * 1e3);
  33. }
  34. }
  35.  
  36. bot.once("ready", () => {
  37. console.log(Date.now(), "Started with " + bot.users.size + " users.");
  38. changeDiscriminator();
  39. if(myDiscriminator.includes(bot.user.discriminator)) {
  40. console.log(`I successfully got the discrim ${bot.user.discriminator}!`)
  41. process.exit();
  42. }
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement