Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const discord = require("discord.js")
  2.  
  3. module.exports.run = async (bot, message, arguments) => {
  4.  
  5. var userName = message.author.username;
  6.  
  7. var userDiscriminator = message.author.discriminator;
  8.  
  9. var status = true
  10.  
  11. var Eenheid, collected, msgVraag;
  12.  
  13. const filter = m => m.author.id === message.author.id;
  14.  
  15. message.delete(9000);
  16.  
  17. TrainingRe = new discord.RichEmbed()
  18. .setTitle("**Kies de eenheid:**")
  19. .setDescription("👮) Politie \n👨‍🚒) Brandweer \n👨‍)Ambulance\n🕵️‍)Kmar\n🕵️‍)DSI\n\n\n **HOOFDLETTER GEVOELIG**")
  20. .setColor("#4287f5")
  21. msgVraag = await message.reply(TrainingRe);
  22.  
  23. collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ["time"] })
  24. .catch(error => { return message.reply(`De tijd is verlopen.\nHet command werd geanuleerd.`) });
  25.  
  26. if (collected.size > 0) {
  27.  
  28. if (collected.first().content === 'stop') {
  29. status = false;
  30. };
  31.  
  32. eenheidreply = collected.first().content;
  33.  
  34. if (eenheidreply === "politie") Eenheid = ("Politie"),kleur = ("#1f5de0")
  35. else if (eenheidreply === "Politie") Eenheid = ("Politie"),kleur = ("#1f5de0")
  36. else if (eenheidreply === "POLITIE") Eenheid = ("Politie"),kleur = ("#1f5de0")
  37. else if (eenheidreply === "brandweer") Eenheid = ("Brandweer"),kleur = ("#eb4034")
  38. else if (eenheidreply === "Brandweer") Eenheid = ("Brandweer"),kleur = ("#eb4034")
  39. else if (eenheidreply === "BRANDWEER") Eenheid = ("Brandweer"),kleur = ("#eb4034")
  40. else if (eenheidreply === "DSI") Eenheid = ("DSI"),kleur = ("#000000")
  41. else if (eenheidreply === "Kmar") Eenheid = ("Kmar"),kleur = ("#040078")
  42. else if (eenheidreply === "Ambulance") Eenheid = ("Ambulance"),kleur = ("#ffee00")
  43. else Eenheid = 0;
  44.  
  45. collected.first().delete(10000);
  46. msgVraag.delete(9000);
  47.  
  48. } else return;
  49. if (status === true){
  50. Tijdreq = new discord.RichEmbed()
  51. .setDescription(`Om welke tijd wilt u deze training doen?`)
  52. .setColor("#4287f5")
  53.  
  54. msgVraag = await message.channel.send(Tijdreq);
  55.  
  56. collected = await message.channel.awaitMessages(filter, { max: 1, time: 1200000, errors: ["time"] })
  57. .catch(error => { return message.reply(`De tijd is verlopen.\nHet command werd geanuleerd.`) });
  58.  
  59. if (collected.size > 0) {
  60. if (collected.first().content === 'stop') {
  61. status = false;
  62. };
  63. var Tijdw = collected.first().content;
  64.  
  65. if (Tijdw === "10 uur") Tijd = ("10:00")
  66. else if (Tijdw === "10 Uur") Tijd = ("10:00")
  67. else if (Tijdw === "10 UUR") Tijd = ("10:00")
  68. else if (Tijdw === "10") Tijd = ("10:00")
  69. else if (Tijdw === "10:00") Tijd = ("10:00")
  70.  
  71. else if (Tijdw === "11 Uur") Tijd = ("11:00")
  72. else if (Tijdw === "11 UUR") Tijd = ("11:00")
  73. else if (Tijdw === "11 Uur") Tijd = ("11:00")
  74. else if (Tijdw === "11") Tijd = ("11:00")
  75.  
  76. else if (Tijdw === "12 Uur") Tijd = ("12:00")
  77. else if (Tijdw === "12 UUR") Tijd = ("12:00")
  78. else if (Tijdw === "12 Uur") Tijd = ("12:00")
  79. else if (Tijdw === "12") Tijd = ("12:00")
  80.  
  81. else if (Tijdw === "13 Uur") Tijd = ("13:00")
  82. else if (Tijdw === "13 UUR") Tijd = ("13:00")
  83. else if (Tijdw === "13 Uur") Tijd = ("13:00")
  84. else if (Tijdw === "13") Tijd = ("13:00")
  85.  
  86. else if (Tijdw === "14 Uur") Tijd = ("14:00")
  87. else if (Tijdw === "14 UUR") Tijd = ("14:00")
  88. else if (Tijdw === "14 Uur") Tijd = ("14:00")
  89. else if (Tijdw === "14") Tijd = ("14:00")
  90.  
  91. else if (Tijdw === "15 Uur") Tijd = ("15:00")
  92. else if (Tijdw === "15 UUR") Tijd = ("15:00")
  93. else if (Tijdw === "15 Uur") Tijd = ("15:00")
  94. else if (Tijdw === "15") Tijd = ("15:00")
  95.  
  96. else if (Tijdw === "16 Uur") Tijd = ("16:00")
  97. else if (Tijdw === "16 UUR") Tijd = ("16:00")
  98. else if (Tijdw === "16 uur") Tijd = ("16:00")
  99. else if (Tijdw === "16") Tijd = ("16:00")
  100.  
  101. else if (Tijdw === "17 Uur") Tijd = ("17:00")
  102. else if (Tijdw === "17 UUR") Tijd = ("17:00")
  103. else if (Tijdw === "17 Uur") Tijd = ("17:00")
  104. else if (Tijdw === "17") Tijd = ("17:00")
  105.  
  106. else if (Tijdw === "18 Uur") Tijd = ("18:00")
  107. else if (Tijdw === "18 UUR") Tijd = ("18:00")
  108. else if (Tijdw === "18 Uur") Tijd = ("18:00")
  109. else if (Tijdw === "18") Tijd = ("18:00")
  110.  
  111. else if (Tijdw === "19 Uur") Tijd = ("19:00")
  112. else if (Tijdw === "19 UUR") Tijd = ("19:00")
  113. else if (Tijdw === "19 Uur") Tijd = ("19:00")
  114. else if (Tijdw === "19") Tijd = ("19:00")
  115.  
  116. else if (Tijdw === "20 Uur") Tijd = ("20:00")
  117. else if (Tijdw === "20 UUR") Tijd = ("20:00")
  118. else if (Tijdw === "20 Uur") Tijd = ("20:00")
  119. else if (Tijdw === "20") Tijd = ("20:00")
  120. else Tijd = Tijdw;
  121.  
  122. collected.first().delete(10000);
  123. msgVraag.delete(9000);
  124. } else return;
  125.  
  126.  
  127.  
  128. Hostreq = new discord.RichEmbed()
  129. .setDescription(`Wie is de host?(Roblox Naam)`)
  130. .setColor("#4287f5")
  131.  
  132. msgVraag = await message.channel.send(Hostreq);
  133.  
  134. collected = await message.channel.awaitMessages(filter, { max: 1, time: 1200000, errors: ["time"] })
  135. .catch(error => { return message.reply(`De tijd is verlopen.\nHet command werd geanuleerd.`) });
  136.  
  137. if (collected.size > 0) {
  138. if (collected.first().content === 'stop') {
  139. status = false;
  140. };
  141.  
  142. var Host = collected.first().content;
  143.  
  144. collected.first().delete(10000);
  145. msgVraag.delete(9000);
  146.  
  147. } else return;
  148.  
  149. if (status === true){
  150.  
  151. CoHostreq = new discord.RichEmbed()
  152. .setDescription(`Wie is de Co-host?(Roblox Naam)`)
  153. .setColor("#4287f5")
  154.  
  155. msgVraag = await message.channel.send(CoHostreq);
  156.  
  157. collected = await message.channel.awaitMessages(filter, { max: 1, time: 1200000, errors: ["time"] })
  158. .catch(error => { return message.reply(`De tijd is verlopen.\nHet command werd geanuleerd.`) });
  159.  
  160. if (collected.size > 0) {
  161. if (collected.first().content === 'stop') {
  162. status = false;
  163. };
  164.  
  165. var CoHost = collected.first().content;
  166. collected.first().delete(10000);
  167. msgVraag.delete(9000);
  168. } else return;
  169.  
  170. if (status === true){
  171.  
  172. Opreq = new discord.RichEmbed()
  173. .setDescription(`Zijn er enkele opmerkingen?(Bijzonderheden)`)
  174. .setColor("#4287f5")
  175.  
  176. msgVraag = await message.channel.send(Opreq);
  177.  
  178. collected = await message.channel.awaitMessages(filter, { max: 1, time: 1200000, errors: ["time"] })
  179. .catch(error => { return message.reply(`De tijd is verlopen.\nHet command werd geanuleerd.`) });
  180.  
  181. if (collected.size > 0) {
  182. if (collected.first().content === 'stop') {
  183. status = false;
  184. };
  185. var Opmerkingen = collected.first().content;
  186. collected.first().delete(10000);
  187. msgVraag.delete(9000);
  188. } else return;
  189.  
  190. TrainingAnnoucement = new discord.RichEmbed()
  191. .setTitle("**TRAINING**")
  192. .addField("Eenheid:", Eenheid)
  193. .addField("Tijd:", Tijd)
  194. .addField("Host:", Host)
  195. .addField("Co-host:", CoHost)
  196. .addField("Opmerkingen:", Opmerkingen)
  197. .setColor(kleur);
  198.  
  199. if (status === true){
  200.  
  201. var trainingschannel = bot.channels.get("585491529708208128");
  202.  
  203. trainingschannel.send(TrainingAnnoucement).then(trainingschannel.send("@here"));
  204.  
  205. if(!Data[TID]) Data[TID] = {
  206. eenheid: (`${Eenheid}`),
  207. tijd: (`${Tijd}`),
  208. host: (`${Host}`),
  209. cohost: (`${CoHost}`),
  210. opmerking: (`${Opmerkingen}`),
  211. tid: (`${TID}`),
  212. date: (`${datum}`),
  213. mID: (`${MesID}`)
  214. }
  215.  
  216. };
  217. } else;
  218. } else;
  219. } else;
  220. }
  221.  
  222.  
  223. module.exports.help = {
  224.     name: "training"
  225. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement