Advertisement
ejectedmatrix

Untitled

Jun 2nd, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. const Discord = require('discord.js')
  2. const bot = new Discord.Client();
  3.  
  4. bot.on('ready', () => {
  5. console.log("Made BySCP-682 Hated Monster");
  6. });
  7.  
  8. bot.on('message', function(message){
  9. const prefix = ";";
  10.  
  11. let command = message.content.split(";")[0];
  12. command = command.slice(prefix.length)
  13.  
  14. if (command === "say")
  15. message.channel.sendMessage(args.join(" "));
  16.  
  17. }
  18.  
  19. if (command === "sneakerkick")
  20. let modRole = message.guild.roles.find("name", "Mods").catch(console.error);
  21. if (!message.member.roles.has(modRole.id)).catch(console.error);
  22. } else {
  23. return message.reply("You dipshit. You dont even fucking have The Owners or Admins Permission to do so.").catch(console.error);
  24. }
  25. if(message.mentions.users.size === 0) {
  26. return message.reply("Hello Sexy Admin. Please specify a user to kick in the ASS into the moon").catch(console.error);
  27. }
  28. let kickmember = message.guild.member(message.mention.users.first());
  29. if(!kickmember) {
  30. return message.reply("That message doesnt appear to be valid sexy beast.").catch(console.error);
  31. }
  32. if(!message.guild.member(bot.user).hasPermission("KICK_MEMBERS")) {
  33. return message.reply("You are no admin dummy");
  34. }
  35. kickMember.kick.then(member => {
  36. message.reply(`${member.user.username} Has been fucked up... and sent to space with the boot of the ADMIN :joy:`).catch(console.error);
  37. }).catch(console.error)
  38. }
  39. if (message === "eval") {
  40. if(!message.author.id !== "199005970721013770") return;
  41. try {
  42. var code = args.join(" ");
  43. var evaled = eval(code);
  44.  
  45. if (typeof evaled !== "string")
  46. evaled = require("util").inspect(evaled);
  47.  
  48. message.channel.sendcode("xl", clean(evaled));
  49. } catch(err) {
  50. message.channel.sendMessage(`\`ERROR\` \`\`\`xl\n${clean(err)}
  51. }
  52. }
  53. }};
  54. });
  55. function clean(text) {
  56. if (typeof(text) === "string")
  57. return text.replace(`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
  58. }
  59.  
  60.  
  61. bot.login("MTk5MDA1OTcwNzIxMDEzNzcw.DAx4Ag.jeJLmg6GCZzFZ2ibNG0uvW_m-sA")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement