Advertisement
n3k4a

Untitled

May 11th, 2019
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. var prefix = "YourPrefix"
  2.  
  3. if (message.channel.type === "dm") { //if the channel is a DM channel
  4. var args = message.content.split(" ").slice(0)
  5. var args = args.slice(0).join(" ") //create the args
  6.  
  7. if (message.content.startsWith(prefix)) return message.channel.send(":x: Please use commands in real server! :x:") //if the message is a command
  8. message.channel.send("This message has been send to the staff! :incoming_envelope:");
  9. if (message.content.startsWith(prefix)) return
  10. if (args.length > 256) return message.reply("Your message content too many characters :/") //if the message contnt more than 256 character, what fields do not allow
  11. var embed = new Discord.RichEmbed()
  12. .setColor('RANDOM')
  13. .setTitle("New request in DM!")
  14. .addField(args, "Send by: " + message.author.username + " with the ID: " + message.author.id)
  15. bot.guilds.get("YOUR_GUILD_ID").channels.get("YOUR_CHANNEL_ID").send(embed) //send the embed in a specific channel
  16. }
  17.  
  18.  
  19. if (message.content.startsWith(prefix + "reply")) {
  20. if (message.author.id !== "YOUR_ID") return message.reply('You cannot use that!')
  21. var args = message.content.split(" ").slice(0)
  22. var Rargs = message.content.split(" ").slice(2).join(" ")
  23. var userID = args[1]
  24. if (isNaN(args[1])) return message.reply("This is not an ID!") //if args is Not A Number!
  25. var embed = new Discord.RichEmbed()
  26. .setColor('RANDOM')
  27. .setTitle("the staff answered you!")
  28. .setDescription(Rargs)
  29. .setFooter("this message was sent to you by: " + message.author.username + " !")
  30. bot.users.get(userID).send(embed)
  31. message.channel.send("Send!").catch(console.error) //send the message
  32. //it may be that if the user has blocked your bot that it does not work
  33. } //Toxic Codes n3k4a is one //Toxic Codes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement