You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/prefix.js

10 lines
444 B
JavaScript

exports.run = (client, message, args) => {
if (message.author.id == "267065637183029248") {
// Gets the prefix from the command (eg. "!prefix +" it will take the "+" from it)
let newPrefix = message.content.split(" ").slice(1, 2)[0];
// change the configuration in memory
config.prefix = newPrefix;
// Now we have to save the file.
fs.writeFile("./config.json", JSON.stringify(config), (err) => console.error);
}
}