Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { Client} = require('discord.js');
  2. const client = new Client({ disableEveryone: true });
  3. const ytdl = require('ytdl-core')
  4. var spam = 0
  5. var deldel;
  6. client.on('message',  msg => {
  7.     //msg.channel.sendMessage('bobby needs nudies');
  8.  
  9.     //log
  10.     if (msg.channel.name == undefined) {
  11.         console.log("[dms] " + msg.author.username + ": " + msg.content);
  12.     } else {
  13.         console.log("[" + msg.channel.name + "] " + msg.author.username + ": " + msg.content);
  14.     };
  15.    
  16.     //filter
  17.     var lC = msg.content.toLowerCase();
  18.     if (lC.includes('fuck') == true || lC.includes('nig') == true || lC.includes('bitch') == true || lC.includes('cunt') == true || lC.includes('shit') == true) {
  19.         msg.delete();
  20.         console.log('[' + msg.channel.name + '] message "' + msg.content + '" deleted.');
  21.     }
  22.  
  23.     var b = [
  24.         'https://cdn.discordapp.com/attachments/625129989498470412/635675643236843520/images.png',
  25.         'https://cdn.discordapp.com/attachments/625129989498470412/635675821268402187/minion8.png',
  26.         'https://cdn.discordapp.com/attachments/625129989498470412/635675542313631794/images.png',
  27.         'https://cdn.discordapp.com/attachments/625129989498470412/635675055036301326/9k.png',
  28.         'https://cdn.discordapp.com/attachments/625129989498470412/635675100825255967/Z.png',
  29.         'https://cdn.discordapp.com/attachments/625129989498470412/635675005711024148/9k.png',
  30.         'https://cdn.discordapp.com/attachments/625129989498470412/635673981336420383/image0.jpg',
  31.         'https://cdn.discordapp.com/attachments/625129989498470412/635644327523254326/image0.jpg',
  32.         'https://cdn.discordapp.com/attachments/625129989498470412/635026014967431173/c1l0xqyym5021.png',
  33.         'https://cdn.discordapp.com/attachments/625129989498470412/635025616118349845/images.png',
  34.         'https://cdn.discordapp.com/attachments/625129989498470412/635025290392895495/2Q.png',
  35.         'https://cdn.discordapp.com/attachments/625129989498470412/635020031226413068/9a68fe16743735a9f18de4aeac745861417408edb1710738ab6686908e15cd24.png',
  36.         'https://i.kinja-img.com/gawker-media/image/upload/s--Hsc30h3T--/c_scale,f_auto,fl_progressive,q_80,w_800/lddjladlwahm0bgligtr.png'
  37.     ];
  38.    
  39.     if (deldel == 1){
  40.         setTimeout(() => {
  41.             msg.delete();
  42.             deldel = 0;
  43.           }, 3000);
  44.     }
  45.  
  46.     r = Math.floor(Math.random() * 15);
  47.     if (msg.content == '!minion') {
  48.         msg.channel.sendFile(b[r]);
  49.         deldel = 1;
  50.         msg.delete();
  51.     }
  52.  
  53.     if (lC.includes('obama') == true) {
  54.         msg.channel.sendMessage('shit SHOULD BURN');
  55.         setTimeout(() => {
  56.             msg.delete();
  57.           }, 3000);
  58.     }
  59.     //spam
  60.     if(msg.author.username == 'BobBarian' && msg.content == '!bspam' && spam == 1) {
  61.         console.log('[bobby] stopping spam');
  62.         spam = 0;
  63.     } else if (msg.author.username == 'BobBarian' && msg.content == '!bspam' && spam == 0) {
  64.         console.log('[bobby] starting spam');
  65.         spam = 1;
  66.     } else if (spam == 1) {
  67.         msg.channel.send('bobby needs nudies');
  68.     };
  69.    
  70. });
  71.  
  72. client.on('ready', () => {
  73.     //client.channels.find("name","general").send('bobby is up and running')
  74.     console.log();
  75.     console.log('good morning gamers');
  76.     console.log();
  77. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement