aboutsummaryrefslogtreecommitdiff
path: root/commands/setprefix.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-23 11:41:02 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-23 11:41:02 -0400
commited456ef581c5acd852a924d9cc274a259b2d8ce5 (patch)
tree33be62f54239fa6f6b61b9488dbfde329ae1fd78 /commands/setprefix.js
parent1ce861095b2793a1b49546c0adf460fbc2fc5d9f (diff)
downloadAleeBot-ed456ef581c5acd852a924d9cc274a259b2d8ce5.tar.gz
AleeBot-ed456ef581c5acd852a924d9cc274a259b2d8ce5.tar.bz2
AleeBot-ed456ef581c5acd852a924d9cc274a259b2d8ce5.zip
Converted to Discord.JS v12, starting database
Diffstat (limited to 'commands/setprefix.js')
-rw-r--r--commands/setprefix.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/commands/setprefix.js b/commands/setprefix.js
index 1c53509..edb42c9 100644
--- a/commands/setprefix.js
+++ b/commands/setprefix.js
@@ -18,35 +18,35 @@
*
* *************************************/
module.exports.run = async (client, message, args) => {
- const moment = require('moment');
- const log = (message) => {
- console.log(`[${moment().format('YYYY-MM-DD HH:mm:ss')}] ${message}`);
- };
- const fs = require('fs');
- if (!message.member.hasPermission('ADMINISTRATOR')) return message.reply('Sorry you need admin to set my prefix');
- if (!args[0] || args[0 == 'help']) return message.reply(`Usage: <your prefix>setprefix <prefix>`);
+ const moment = require('moment');
+ const log = (message) => {
+ console.log(`[${moment().format('YYYY-MM-DD HH:mm:ss')}] ${message}`);
+ };
+ const fs = require('fs');
+ if (!message.member.hasPermission('ADMINISTRATOR')) return message.reply('Sorry you need admin to set my prefix');
+ if (!args[0] || args[0 == 'help']) return message.reply('Usage: <your prefix>setprefix <prefix>');
- const prefixes = JSON.parse(fs.readFileSync('./storage/prefixes.json', 'utf8'));
+ const prefixes = JSON.parse(fs.readFileSync('./storage/prefixes.json', 'utf8'));
- prefixes[message.guild.id] = {
- prefixes: args[0],
- };
+ prefixes[message.guild.id] = {
+ prefixes: args[0],
+ };
- fs.writeFile('./storage/prefixes.json', JSON.stringify(prefixes), (err) =>{
- if (err) log(err);
- });
+ fs.writeFile('./storage/prefixes.json', JSON.stringify(prefixes), (err) =>{
+ if (err) log(err);
+ });
- message.reply(`AleeBot's Prefix in this guild is now \`${args[0]}\``);
- log(`[i] The guild ${message.guild.name} has changed AleeBot's prefix to ${args[0]}`);
+ message.reply(`AleeBot's Prefix in this guild is now \`${args[0]}\``);
+ log(`[i] The guild ${message.guild.name} has changed AleeBot's prefix to ${args[0]}`);
};
exports.conf = {
- aliases: [],
- guildOnly: true,
+ aliases: [],
+ guildOnly: true,
};
exports.help = {
- name: 'setprefix',
- description: 'Sets the guild prefix.',
- usage: 'setprefix [prefix]',
- category: '- Settings Commands',
+ name: 'setprefix',
+ description: 'Sets the guild prefix.',
+ usage: 'setprefix [prefix]',
+ category: '- Settings Commands',
};