re added prefix
This commit is contained in:
parent
7c5f6ec97f
commit
b1c5e96e84
1 changed files with 10 additions and 0 deletions
10
commands/prefix.js
Normal file
10
commands/prefix.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue