Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const fs = require("fs");
- module.exports.run = async (bot, message, args) => {
- if(!message.member.hasPermission("administrator")) return message.reply("you do not have the correct permissions to use this command!");
- if(!args[0] || args[0 == "help"]) return message.reply("Usage: !changetester <open/close>");
- let apps = JSON.parse(fs.readFileSync("./application.json", "utf8"));
- apps[message.guild.id] = {
- apps: args[0]
- };
- fs.writeFile("./application.json", JSON.stringify(apps), (err) => {
- if (err) console.log(err)
- });
- let sEmbed = new Discord.RichEmbed()
- .setColor("#FF9900")
- .setTitle("Tester application system")
- .setDescription(`application are now ${args[0]}!`);
- message.channel.send(sEmbed);
- }
- module.exports.help = {
- name: "changetester"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement