Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. const Discord = require("discord.js")
  2. const fs = require("fs");
  3. const storage = require('../rotation.json')
  4.  
  5. function bigMaps() {
  6. let bigmaps = [ 'up01_a51', 'up01_zombietrade', 'up01_footballarena', 'up01_zombalk', 'mp_containers', 'mp_roofv2', 'mp_trainyard', 'up01_metro', 'up01_unmapacualquiera'];
  7. return bigmaps[Math.floor(Math.random()*bigmaps.length) + 0];
  8. }
  9.  
  10.  
  11. function normalrushMaps() {
  12. var normalmaps = [ 'up01_bier', 'up01_mos_eisleyv2', 'up01_slide', 'mp_aztec', 'up01_knockknockv3', 'up01_milkywayv2', 'up01_desert_storm', 'up01_uprisingv2', 'mp_crazytown', 'up01_loopbruggenland', 'up01_yoshiv3', 'up01_nhl', 'up01_rose', 'up01_thecorridorv2', 'up01_shepardsangel', 'up01_undertheearth', 'up01_zomfadev2', 'up01_mos_eisley', 'up01_doom', 'up01_chateauclassic', 'up01_zombluev1', 'up01_clavarlaespada', 'up01_chamberofsecrets' ];
  13. return normalmaps[Math.floor(Math.random()*normalmaps.length) + 0];
  14. }
  15.  
  16. function smallMaps() {
  17. var smallmaps = [ 'mp_miyo', 'mp_minimilkyway', 'up01_swift', 'up01_koslin', 'up01_timecrunchv2', 'up01_killhouse', 'up01_keiseigyakuten' ];
  18. return smallmaps[Math.floor(Math.random()*smallmaps.length) + 0];
  19. }
  20.  
  21. function constMaps() {
  22. var constmaps = [ 'up01_zomix', 'up01_zomcurev3'];
  23. return constmaps[Math.floor(Math.random()*constmaps.length)];
  24. }
  25.  
  26.  
  27. module.exports.run = async (bot, message, args) => {
  28. if(message.author.id != ("295637890220687360" || "326143318972956674")) return message.reply("This command is not made for you boi!")
  29.  
  30. const embed = new Discord.RichEmbed()
  31. .setTitle(title = `New Maprotation!`)
  32. .setDescription(description = "**The new maprotation!**")
  33. .addField(name= "**Large sized maps**" ,value=`${bigMaps()} \n ${bigMaps()}`, inline = false)
  34. .addField(name = "**Normal sized maps:**",value =`${normalrushMaps()}\n ${normalrushMaps(+4)}\n ${normalrushMaps()}\n ${normalrushMaps()}\n ${normalrushMaps()}\n ${normalrushMaps()}`,inline = false)
  35. .addField(name ="**Small sized maps:**",value =`${smallMaps()}\n ${smallMaps()}\n ${smallMaps()}`, inline = false)
  36. .addField(name = "**Zomix / Zomcure:**",value =`${constMaps()}`, inline = false)
  37.  
  38.  
  39. message.channel.send(embed)
  40.  
  41.  
  42. fs.writeFile("./rotation.json", JSON.stringify(embed), (err) => {
  43. if (err) message.channel.send('there has been an error writing the file!' + err)
  44. });
  45. const cd = JSON.parse(fs.readFileSync("./rotation.json", "utf8"), (err) => {
  46. if (err) message.channel.send('there has been an error retrieving the file!')
  47. });
  48. message.channel.send(cd)
  49. //message.channel.send(maps)
  50.  
  51. }
  52.  
  53. module.exports.config = {
  54. name: "maprotation",
  55. aliases: ["mr"],
  56. usage: "!maprotation",
  57. description: "Create the new maprotation",
  58. noalias: "No aliases",
  59. accessability: "File and ScreaM"
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement