Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. if(message.content.startsWith) {
  2. let suffix = args.join(" ")
  3. if (!suffix) {
  4. return message.channel.send(":x: I need some code to run!")
  5. }
  6. console.log('it executed')
  7. try {
  8. message.channel.send("", {
  9. embed: {
  10. color: 0x00AE86
  11. , title: 'Input:'
  12. , description: "```js\n" + suffix + "```"
  13. }
  14. });
  15. var evaled = eval(suffix);
  16. if (typeof evaled !== "string")
  17. evaled = require("util")
  18. .inspect(evaled);
  19. var finished = `\`\`\`js\n ${clean(evaled)}\`\`\``
  20. if (finished.includes("MzYzNjI1OTUzNzgxNjEyNTQ1.DNUKYA.oQz8zGla0Fyt247tUbyLxzA3l4I")) {
  21. return message.channel.send("", {
  22. embed: {
  23. color: 0x00AE86
  24. , title: 'No.'
  25. , description: `No token for you!`
  26. }
  27. });
  28. }
  29. message.channel.send("", {
  30. embed: {
  31. color: 0x00AE86
  32. , title: 'Output:'
  33. , description: finished
  34. }
  35. });
  36. console.log(finished)
  37. } catch (err) {
  38. //message.channel.send(`\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``);
  39. message.channel.send("", {
  40. embed: {
  41. color: 0x00AE86
  42. , description: `\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``
  43. }
  44. });
  45. };
  46.  
  47. }
  48.  
  49. function clean(text) {
  50. if (typeof (textnow) === "string")
  51. return text.replace(/`/g, "`" + String.fromCharCode(8203))
  52. .replace(/@/g, "@" + String.fromCharCode(8203))
  53. else
  54. return text;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement