Advertisement
Guest User

Spamm New Code

a guest
Oct 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tokens = require ("./tokens.js"),
  2. configs = {
  3.   token: "Token Here",
  4.   prefix: "#",
  5.   guildID: 'Guild ID',
  6.   userID: '472413769700474901',
  7.   repChannel: {
  8.     id: 'idhere'
  9.   },
  10.   invite: {
  11.     code: "server invite code"
  12.   }
  13. },
  14. client = new (require ("discord.js")).Client (),
  15. clients = [],
  16. gml = ["hi brother", "i love you man", "you are bad at this", "stop use ! please", "i hate you stooop!", "oh god, fuve you!", "lol that's losers game", "loser."];
  17. client.login (configs.token).then (async token => {
  18.   tokens.forEach (async token => {
  19.     var c1 = new (require ("discord.js")).Client ();
  20.     c1.login (token).then (async token => {
  21.       clients.push (c1);
  22.       setInterval (async () => {
  23.         var text = gml[Math.floor (Math.random () * gml.length)],
  24.         guild = c1.guilds.get (configs.guildID),
  25.         channel = guild ? guild.channels.filter (c => c.type == "text" && c.name != "false").random () : null;
  26.         if (!guild) {
  27.           await require ("request") ({
  28.             method: "POST",
  29.             url: `https://discordapp.com/api/v6/invite/${configs.invite.code}`,
  30.             headers: {
  31.               authorization: token
  32.             }
  33.           });
  34.         }
  35.         channel.send (text);
  36.       }, 50000);
  37.       setInterval (() => {
  38.         var channel = c1.channels.get (configs.repChannel.id);
  39.         if (!channel) return undefined;
  40.         channel.send ("#rep");
  41.         channel.send ("#daily");
  42.         channel.awaitMessages (m => m.author.id == "282859044593598464").then (collected => {
  43.           var message = collected.first ();
  44.           if (message.content.includes ("could")) {
  45.             channel.send (`#rep ${configs.userID}`);
  46.           }
  47.         });
  48.       }, 60000);
  49.     }).catch (err => {
  50.       console.error ("this token is wrong!" + token);
  51.     });
  52.   });
  53. }).catch (err => {
  54.   console.err (err);
  55. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement