Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js")
- const fs = require("fs");
- const storage = require('../rotation.json')
- function bigMaps() {
- let bigmaps = [ 'up01_a51', 'up01_zombietrade', 'up01_footballarena', 'up01_zombalk', 'mp_containers', 'mp_roofv2', 'mp_trainyard', 'up01_metro', 'up01_unmapacualquiera'];
- return bigmaps[Math.floor(Math.random()*bigmaps.length) + 0];
- }
- function normalrushMaps() {
- 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' ];
- return normalmaps[Math.floor(Math.random()*normalmaps.length) + 0];
- }
- function smallMaps() {
- var smallmaps = [ 'mp_miyo', 'mp_minimilkyway', 'up01_swift', 'up01_koslin', 'up01_timecrunchv2', 'up01_killhouse', 'up01_keiseigyakuten' ];
- return smallmaps[Math.floor(Math.random()*smallmaps.length) + 0];
- }
- function constMaps() {
- var constmaps = [ 'up01_zomix', 'up01_zomcurev3'];
- return constmaps[Math.floor(Math.random()*constmaps.length)];
- }
- module.exports.run = async (bot, message, args) => {
- if(message.author.id != ("295637890220687360" || "326143318972956674")) return message.reply("This command is not made for you boi!")
- const embed = new Discord.RichEmbed()
- .setTitle(title = `New Maprotation!`)
- .setDescription(description = "**The new maprotation!**")
- .addField(name= "**Large sized maps**" ,value=`${bigMaps()} \n ${bigMaps()}`, inline = false)
- .addField(name = "**Normal sized maps:**",value =`${normalrushMaps()}\n ${normalrushMaps(+4)}\n ${normalrushMaps()}\n ${normalrushMaps()}\n ${normalrushMaps()}\n ${normalrushMaps()}`,inline = false)
- .addField(name ="**Small sized maps:**",value =`${smallMaps()}\n ${smallMaps()}\n ${smallMaps()}`, inline = false)
- .addField(name = "**Zomix / Zomcure:**",value =`${constMaps()}`, inline = false)
- message.channel.send(embed)
- fs.writeFile("./rotation.json", JSON.stringify(embed), (err) => {
- if (err) message.channel.send('there has been an error writing the file!' + err)
- });
- const cd = JSON.parse(fs.readFileSync("./rotation.json", "utf8"), (err) => {
- if (err) message.channel.send('there has been an error retrieving the file!')
- });
- message.channel.send(cd)
- //message.channel.send(maps)
- }
- module.exports.config = {
- name: "maprotation",
- aliases: ["mr"],
- usage: "!maprotation",
- description: "Create the new maprotation",
- noalias: "No aliases",
- accessability: "File and ScreaM"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement