Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.           if (msg.author.bot) return;
  2.            if(msg.channel.id =="484367012114464778" || msg.channel.id =="484366916723408937" || msg.channel.id =="484366988911575051" || msg.channel.id =="495009929711583243") {
  3.          //ids for staff test rooms so I don't have to swap tabs
  4.          // "472208905355919360" && "472209213247062026"
  5.          //char limit for channel
  6.              if(msg.member.roles.some(r=>["Staff","Moderator","Admin"].includes(r.name))){
  7.         return;
  8.         //else run play command
  9.         }
  10.          if (msg.content.length < 100){
  11.      
  12.           //console logging for my own use / moderation
  13.           console.log(msg.author.username+' : '+ msg.author.id);
  14.           console.log('in: '+msg.channel.name);
  15.           console.log(msg.content);
  16.           console.log(msg.createdAt);  
  17.           console.log('\n');
  18.               //collect message and store to a variable, convert to string so nothing wonky happens
  19.               var messageToSend = msg.content.toString();
  20.              msg.delete();    
  21.              //message author their message
  22.                msg.author.send(
  23. 'Hello, I am a bot. I had to remove your previous message in '+ msg.channel.name+' because it broke our roleplaying rule number 7.\n\
  24. **7.** __Follow the Channel\'s Roleplaying Limits. Details in their Descriptions.__\n\
  25. *- You should roleplay with more than 100 characters (~2 sentences) in the roleplaying channels.*\n\
  26. *- If roleplaying in the general channels, try to keep roleplaying messages below 400 characters (~3-4 sentences).\
  27. Otherwise, please move to the roleplaying channels*\n\
  28. *- As example, you should not roleplay with "moans", "pokes" without any other details in the roleplaying channels.*\n\
  29. Please change your message to comply to this rule.\n\n\
  30. **Do not respond to this message. If you have questions, please ask a staff member in the group.**\n\n\
  31. \nYour removed message:' +'\n"'+ messageToSend+'"');
  32.                
  33.                
  34.                 //empty data from messageToSend
  35.                 messageToSend = "";
  36.             }
  37.               return;
  38.           }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement