Advertisement
Guest User

Untitled

a guest
Nov 10th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 KB | None | 0 0
  1. const discord = require('discord.js');
  2. const bot = new discord.Client();
  3.  
  4. const http = require('http');
  5. const port = process.env.PORT || 3000
  6. http.createServer().listen(port);
  7. const token = ''
  8.  
  9.  
  10. // Bot On Ready Console \\
  11. bot.on('ready', () => {
  12. console.log("Bot Is Ready");
  13. bot.user.setActivity("AnytimeMC Applications!!", {type: "WATCHING"})
  14. })
  15.  
  16.  
  17.  
  18. // Staff \\
  19. let userApplications = {}
  20.  
  21. bot.on("message", function(message) {
  22. if (message.author.equals(bot.user)) return;
  23.  
  24. let authorId = message.author.id;
  25.  
  26. if (message.content === "!apply") {
  27. console.log(`Apply begin for authorId ${authorId}`);
  28. if (!(authorId in userApplications)) {
  29. userApplications[authorId] = { "step" : 1}
  30. message.author.send("‏‏‎ ‎")
  31. message.author.send(">>> Staff Application")
  32. message.author.send(">>> Question 1: You understand and AGREE that these positions are NON PAID positions for the time being. AND YOU MUST HAVE A MICROPHONE");
  33. }
  34.  
  35. } else {
  36.  
  37. if (message.channel.type === "dm" && authorId in userApplications) {
  38. let authorApplication = userApplications[authorId];
  39.  
  40. if (authorApplication.step == 1 ) {
  41. authorApplication.answer1 = message.content;
  42. message.author.send(">>> Question 2: How Old are You");
  43. authorApplication.step ++;
  44. }
  45. else if (authorApplication.step == 2) {
  46. authorApplication.answer2 = message.content;
  47. message.author.send(">>> Question 3: WE ASSIGN TASK IN A PROGRAM CALLED MEISTERTASK, PLEASE ATTACH YOUR EMAIL SO WE MAY ADD YOU TO THIS IF YOU ARE ACCEPTED. YOUR APPLCIATION AND PERSONAL INFO WILL BE DELETED IF YOU ARE DENIED. https://www.meistertask.com/");
  48. authorApplication.step ++;
  49. }
  50. else if (authorApplication.step == 3) {
  51. authorApplication.answer3 = message.content;
  52. message.author.send(">>> Question 4: Please confirm that you are aware that only successful applicants will receive a response, and if no response is received you may reapply in 30 days?");
  53. authorApplication.step ++;
  54. }
  55. else if (authorApplication.step == 4) {
  56. authorApplication.answer4 = message.content;
  57. message.author.send(">>> Question 5: What’s your minecraft Username?");
  58. authorApplication.step ++;
  59. }
  60. else if (authorApplication.step == 5) {
  61. authorApplication.answer5 = message.content;
  62. message.author.send(">>> Question 6: What is your Discord Name?");
  63. authorApplication.step ++;
  64. }
  65. else if (authorApplication.step == 6) {
  66. authorApplication.answer6 = message.content;
  67. message.author.send(">>> Question 7: What Position Are You Applying For? Helper, Mod, Builder Or Developer");
  68. authorApplication.step ++;
  69. }
  70. else if (authorApplication.step == 7) {
  71. authorApplication.answer7 = message.content;
  72. message.author.send(">>> Question 8: Why Should We Choose You Over Others?");
  73. authorApplication.step ++;
  74. }
  75. else if (authorApplication.step == 8) {
  76. authorApplication.answer8 = message.content;
  77. message.author.send(">>> Question 9: How much time do you have to contribute to the role?");
  78. authorApplication.step ++;
  79.  
  80. }
  81. else if (authorApplication.step == 9) {
  82. authorApplication.answer9 = message.content;
  83. message.author.send(">>> Question 10: Have you ever been banned or punished on any server? If so, please include details.");
  84. authorApplication.step ++;
  85. }
  86. else if (authorApplication.step == 10) {
  87. authorApplication.answer10 = message.content;
  88. message.author.send(">>> Question 11: Do you have any experience with config or plugins, would you be able to edit configs if you are tasked with that job for the day?");
  89. authorApplication.step ++;
  90.  
  91. }
  92. else if (authorApplication.step == 11) {
  93. authorApplication.answer11 = message.content;
  94. message.author.send(">>> Question 12: Do you have any past staff experience?");
  95. authorApplication.step ++;
  96.  
  97. }
  98. else if (authorApplication.step == 12) {
  99. authorApplication.answer12 = message.content;
  100. message.author.send(">>> Question 13: What are your strengths and weaknesses");
  101. authorApplication.step ++;
  102. }
  103. else if (authorApplication.step == 13) {
  104. authorApplication.answer13 = message.content;
  105. message.author.send(">>> Question 14: Why do you want to join AnytimeMC?");
  106. authorApplication.step ++;
  107. }
  108. else if (authorApplication.step == 14) {
  109. authorApplication.answer14 = message.content;
  110. message.author.send(">>> Question 15: What can you bring to Our team?");
  111. authorApplication.step ++;
  112. }
  113. else if (authorApplication.step == 15) {
  114. authorApplication.answer15 = message.content;
  115. message.author.send(">>> Question 16: IS THERE ANYTHING ELSE WE SHOULD KNOW? ");
  116. authorApplication.step ++;
  117.  
  118. }
  119. else if (authorApplication.step == 16) {
  120. authorApplication.answer16 = message.content;
  121. message.author.send(">>> Question 17: YOU AGREE TO DO A VERBAL INTERVIEW IF YOUR APPLICATION IS ACCEPTED");
  122. authorApplication.step ++;
  123. }
  124. else if (authorApplication.step == 17) {
  125. authorApplication.answer17 = message.content;
  126. message.author.send(">>> Question 18: IF YOU ARE APPLYING FOR BUILDER OR DEV, PLEASE SHOW ANY PORTFOLIOS IN THE VERBAL INTERVIEW.");
  127. authorApplication.step ++;
  128. }
  129.  
  130. else if (authorApplication.step == 18) {
  131. authorApplication.answer18 = message.content;
  132. message.author.send(">>> Thank You!")
  133. message.channel.cache.get("774833147321647104")
  134. .send(`${message.author}\n >>> **Question 1: You understand and AGREE that these positions are NON PAID positions for the time being. AND YOU MUST HAVE A MICROPHONE** \n Answer: ${authorApplication.answer1}\n **Question 2: How Old are You?** \n Answer: ${authorApplication.answer2}\n **Question 3: WE ASSIGN TASK IN A PROGRAM CALLED MEISTERTASK, PLEASE ATTACH YOUR EMAIL SO WE MAY ADD YOU TO THIS IF YOU ARE ACCEPTED. YOUR APPLCIATION AND PERSONAL INFO WILL BE DELETED IF YOU ARE DENIED** \n Answer: ${authorApplication.answer3}\n **Question 4: Please confirm that you are aware that only successful applicants will receive a response, and if no response is received you may reapply in 30 days?**\n Answer: ${authorApplication.answer4}\n **Question 5: What’s your minecraft Username?** \n Answer: ${authorApplication.answer5}\n **Question 6: What is your Discord Name?** \n Answer: ${authorApplication.answer6}\n **Question 7: What Position Are You Applying For? Helper, Mod, Builder Or Developer** \n Answer: ${authorApplication.answer7}\n **Question 8: Why Should We Choose You Over Others?** \n Answer: ${authorApplication.answer8}\n **Question 9: How much time do you have to contribute to the role?** \n Answer: ${authorApplication.answer9}\n **Question 10: Have you ever been banned or punished on any server? If so, please include details.** \n Answer: ${authorApplication.answer10}\n **Question 11: Do you have any experience with config or plugins, would you be able to edit configs if you are tasked with that job for the day?"** \n Answer: ${authorApplication.answer11}\n **Question 12: Do you have any past staff experience?** \n Answer: ${authorApplication.answer12}\n **Question 13: What are your strengths and weaknesses** \n Answer: ${authorApplication.answer13}\n **Question 14: Why do you want to join AnytimeMC?** \n Answer: ${authorApplication.answer14}\n **Question 15: What can you bring to Our team?** \n Answer: ${authorApplication.answer15}\n **Question 16: IS THERE ANYTHING ELSE WE SHOULD KNOW?** \n Answer: ${authorApplication.answer16}\n **Question 17: YOU AGREE TO DO A VERBAL INTERVIEW IF YOUR APPLICATION IS ACCEPTED** \n Answer: ${authorApplication.answer17}\n **Question 18: IF YOU ARE APPLYING FOR BUILDER OR DEV, PLEASE SHOW ANY PORTFOLIOS IN THE VERBAL INTERVIEW.** \n Answer: ${authorApplication.answer18}`);
  135. delete userApplications[authorId];
  136.  
  137.  
  138. }
  139. }
  140. }
  141. }
  142. );
  143.  
  144.  
  145. // Police \\
  146. bot.on("message", function(message) {
  147. if (message.author.equals(bot.user)) return;
  148.  
  149. let authorId = message.author.id;
  150.  
  151.  
  152. }
  153.  
  154. );
  155.  
  156. bot.on('error', err => {
  157. console.log(err);
  158.  
  159. });
  160.  
  161.  
  162. bot.login(token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement