aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/addquote.js46
-rw-r--r--commands/ask.js63
-rw-r--r--commands/avatarurl.js10
-rw-r--r--commands/balance.js59
-rw-r--r--commands/ban.js32
-rw-r--r--commands/eval.js98
-rw-r--r--commands/git.js86
-rw-r--r--commands/help.js140
-rw-r--r--commands/info.js47
-rw-r--r--commands/interrogate.js39
-rw-r--r--commands/invite.js62
-rw-r--r--commands/jail.js39
-rw-r--r--commands/kick.js34
-rw-r--r--commands/leaveguild.js37
-rw-r--r--commands/pay.js84
-rw-r--r--commands/ping.js66
-rw-r--r--commands/poweroff.js49
-rw-r--r--commands/purge.js41
-rw-r--r--commands/quote.js37
-rw-r--r--commands/say.js39
-rw-r--r--commands/setprefix.js59
-rw-r--r--commands/suggest.js53
-rw-r--r--commands/suggestfeature.js1
-rw-r--r--commands/uptime.js88
-rw-r--r--commands/userinfo.js50
-rw-r--r--commands/vtquote.js95
26 files changed, 717 insertions, 737 deletions
diff --git a/commands/addquote.js b/commands/addquote.js
index 04df3f4..7782b91 100644
--- a/commands/addquote.js
+++ b/commands/addquote.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* AddQuote: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,19 +15,19 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
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(!args[0]) return message.reply(`Usage: ab:addquote [author] [authorImage] [quote] [year]`);
-
+
let quotes = JSON.parse(fs.readFileSync("./storage/quotes.json", "utf8"));
quotes = {
@@ -36,25 +36,25 @@ module.exports.run = async (client, message, args) => {
quote: args[2],
year: args[3]
};
-
+
fs.writeFile("./storage/quotes.json", JSON.stringify(quotes), (err) =>{
if (err) log(err)
})
-
+
message.reply(`You just added a new quote!`);
- log(`[i] A quote has been added to quotes.json...`)
+ log(`[i] A quote has been added to quotes.json...`)
*/
- message.reply('Command is broken for now');
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: true,
- };
- exports.help = {
- name: 'addquote',
- description: 'Sets the guild prefix.',
- usage: 'addquote [author] [authorImage] [quote] [year]',
- category: '- Quote Commands',
- };
-
+ message.reply('Command is broken for now');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: true,
+};
+exports.help = {
+ name: 'addquote',
+ description: 'Sets the guild prefix.',
+ usage: 'addquote [author] [authorImage] [quote] [year]',
+ category: '- Quote Commands',
+};
+
diff --git a/commands/ask.js b/commands/ask.js
index db9e10e..0bc0761 100644
--- a/commands/ask.js
+++ b/commands/ask.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Ask: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,35 +15,34 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- let abaskanswer = [
- "Yes.",
- "Nope. Just kidding :P",
- "Definitely!",
- "No.",
- "Yep. Just kidding :P",
- "I doubt it.",
- "Maybe?",
- "I don't know?",
- "Hmm let me think :thinking:"
- ];
- if (args[1]) {
- message.channel.sendMessage(abaskanswer[Math.floor(Math.random() * abaskanswer.length)]);
- } else {
- message.channel.sendMessage("Sorry, I don't know what your saying.")
- }
- };
-
- exports.conf = {
- aliases: ['8ball'],
- guildOnly: false,
- };
- exports.help = {
- name: 'ask',
- description: 'Give AleeBot a question!',
- usage: 'ask [args]',
- category: '- Fun Commands',
- };
- \ No newline at end of file
+ const abaskanswer = [
+ 'Yes.',
+ 'Nope. Just kidding :P',
+ 'Definitely!',
+ 'No.',
+ 'Yep. Just kidding :P',
+ 'I doubt it.',
+ 'Maybe?',
+ 'I don\'t know?',
+ 'Hmm let me think :thinking:',
+ ];
+ if (args[1]) {
+ message.channel.sendMessage(abaskanswer[Math.floor(Math.random() * abaskanswer.length)]);
+ } else {
+ message.channel.sendMessage('Sorry, I don\'t know what your saying.');
+ }
+};
+
+exports.conf = {
+ aliases: ['8ball'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'ask',
+ description: 'Give AleeBot a question!',
+ usage: 'ask [args]',
+ category: '- Fun Commands',
+};
diff --git a/commands/avatarurl.js b/commands/avatarurl.js
index 018bc7a..7f9c256 100644
--- a/commands/avatarurl.js
+++ b/commands/avatarurl.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* AvatarURL: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,12 +15,12 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- message.reply(message.author.avatarURL);
+ message.reply(message.author.avatarURL);
};
-
+
exports.conf = {
aliases: [],
guildOnly: false,
diff --git a/commands/balance.js b/commands/balance.js
index ae575cc..7b340b2 100644
--- a/commands/balance.js
+++ b/commands/balance.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Balance: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,37 +15,36 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- const db = require('quick.db');
- const { RichEmbed } = require('discord.js');
+ const db = require('quick.db');
+ const {RichEmbed} = require('discord.js');
+
+ const user = message.mentions.users.first() || message.author;
- let user = message.mentions.users.first() || message.author;
+ let balance = await db.fetch(`userBalance_${user.id}`);
- let balance = await db.fetch(`userBalance_${user.id}`);
+ if (balance === null) {
+ db.set(`userBalance_${message.author.id}`, 0);
+ balance = 0;
+ }
+ const embed = new RichEmbed()
+ .setDescription(`**AleeCorp Bank**`)
+ .addField('Account Holder: ', user.username, true)
+ .addField('Account Balance: ', balance, true)
+ .setColor('#1fd619');
- if (balance === null) {
- db.set(`userBalance_${message.author.id}`, 0);
- balance = 0;
- }
- const embed = new RichEmbed()
- .setDescription(`**AleeCorp Bank**`)
- .addField('Account Holder: ', user.username, true)
- .addField('Account Balance: ', balance, true)
- .setColor('#1fd619')
+ message.channel.send({embed});
+};
- message.channel.send({embed})
- };
-
- exports.conf = {
- aliases: ['bal', 'money'],
- guildOnly: false,
- };
- exports.help = {
- name: 'balance',
- description: 'Checks the balance of AleeBot',
- usage: 'balance [@someone (optional)]',
- category: '- Economy Commands',
- };
- \ No newline at end of file
+exports.conf = {
+ aliases: ['bal', 'money'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'balance',
+ description: 'Checks the balance of AleeBot',
+ usage: 'balance [@someone (optional)]',
+ category: '- Economy Commands',
+};
diff --git a/commands/ban.js b/commands/ban.js
index 6331347..354dcaa 100644
--- a/commands/ban.js
+++ b/commands/ban.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Ban: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,22 +15,22 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- const Discord = require('discord.js');
- const mreason = args.join(" ").slice(22);
- if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.")
- if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Uhh... I don\'t have permission to ban members.');
- const member = message.mentions.members.first();
- if (!member) return message.reply("Uhh... Please mention a member first.");
- member.ban(`Banned by ${message.author.tag} Reason: ` + mreason);
- const embed = new Discord.RichEmbed()
- .setTitle('User Banned!')
- .setColor('#1fd619')
- .addField('**User:**', `${member.user.tag}`)
- .addField('**Reason:**', `\`\`\`${mreason}\`\`\``)
- await message.channel.send({ embed });
+ const Discord = require('discord.js');
+ const mreason = args.join(' ').slice(22);
+ if (!message.member.permissions.has('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to ban people.');
+ if (!message.guild.member(client.user).hasPermission('BAN_MEMBERS')) return message.reply('Uhh... I don\'t have permission to ban members.');
+ const member = message.mentions.members.first();
+ if (!member) return message.reply('Uhh... Please mention a member first.');
+ member.ban(`Banned by ${message.author.tag} Reason: ` + mreason);
+ const embed = new Discord.RichEmbed()
+ .setTitle('User Banned!')
+ .setColor('#1fd619')
+ .addField('**User:**', `${member.user.tag}`)
+ .addField('**Reason:**', `\`\`\`${mreason}\`\`\``);
+ await message.channel.send({embed});
};
exports.conf = {
diff --git a/commands/eval.js b/commands/eval.js
index 90b7030..2147376 100644
--- a/commands/eval.js
+++ b/commands/eval.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Eval: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions & jtsshieh + PokeWorld
*
@@ -15,72 +15,70 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (!['242775871059001344',].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
- const { RichEmbed } = require('discord.js');
- const code = args.join(' ');
-
- let evaled;
- let remove;
-
- try {
- remove = text => {
- if (typeof(text) === 'string') {
- return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
- } else {
- return text;
- }
- };
-
- evaled = eval(code);
-
- if (typeof evaled !== 'string') {
- evaled = require('util').inspect(evaled);
+ if (!['242775871059001344'].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
+ const {RichEmbed} = require('discord.js');
+ const code = args.join(' ');
+
+ let evaled;
+ let remove;
+
+ try {
+ remove = (text) => {
+ if (typeof(text) === 'string') {
+ return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
+ } else {
+ return text;
}
-
- } catch (err) {
- const embed = new RichEmbed()
+ };
+
+ evaled = eval(code);
+
+ if (typeof evaled !== 'string') {
+ evaled = require('util').inspect(evaled);
+ }
+ } catch (err) {
+ const embed = new RichEmbed()
.setAuthor('Eval Error')
.setDescription('Eval\'s result')
.addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``)
.addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``)
.setFooter('Eval', client.user.avatarURL)
.setColor('RED');
- return message.channel.send({ embed });
- }
-
- try {
- const embed = new RichEmbed()
+ return message.channel.send({embed});
+ }
+
+ try {
+ const embed = new RichEmbed()
.setAuthor('Eval Success')
.setDescription('Eval\'s result')
.addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``)
.addField(':outbox_tray: Output:', `\`\`\`js\n${remove(evaled)}\n\`\`\``)
.setFooter('Eval', client.user.avatarURL)
.setColor('GREEN');
-
- return message.channel.send({ embed });
- } catch (err) {
- const embed = new RichEmbed()
+
+ return message.channel.send({embed});
+ } catch (err) {
+ const embed = new RichEmbed()
.setAuthor('Eval Error')
.setDescription('Eval\'s result')
.addField(':inbox_tray: Input:', `\`\`\`js\n${code}\n\`\`\``)
.addField(':outbox_tray: Output:', `\`\`\`${err}\`\`\``)
.setFooter('Eval', client.user.avatarURL)
.setColor('RED');
- return message.channel.send({ embed });
- }
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'eval',
- description: 'Evalulates commands.',
- usage: '<code>',
- category: '- Owners Only',
- };
- \ No newline at end of file
+ return message.channel.send({embed});
+ }
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'eval',
+ description: 'Evalulates commands.',
+ usage: '<code>',
+ category: '- Owners Only',
+};
diff --git a/commands/git.js b/commands/git.js
index d6bed8b..cf754f4 100644
--- a/commands/git.js
+++ b/commands/git.js
@@ -1,43 +1,43 @@
-/****************************************
- *
- * Git: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
- const git = require('git-last-commit');
- git.getLastCommit(function(err, commit) {
- const embed = new Discord.RichEmbed()
- .setTitle('GitHub Information')
- .addField('**Repository:**', 'https://github.com/aleeproductions/AleeBot-JS')
- .addField('**Last Commit:**', commit.subject)
- .addField('**Commited By:**', commit.author.name)
- .setColor('#1fd619')
- message.channel.send({ embed });
- })
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'git',
- description: 'Get the git info.',
- usage: 'git',
- category: '- General Commands',
-};
+/** **************************************
+ *
+ * Git: Command for AleeBot
+ * Copyright (C) 2017-2020 Alee Productions
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * *************************************/
+module.exports.run = async (client, message) => {
+ const Discord = require('discord.js');
+ const git = require('git-last-commit');
+ git.getLastCommit(function(err, commit) {
+ const embed = new Discord.RichEmbed()
+ .setTitle('GitHub Information')
+ .addField('**Repository:**', 'https://github.com/aleeproductions/AleeBot-JS')
+ .addField('**Last Commit:**', commit.subject)
+ .addField('**Commited By:**', commit.author.name)
+ .setColor('#1fd619');
+ message.channel.send({embed});
+ });
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'git',
+ description: 'Get the git info.',
+ usage: 'git',
+ category: '- General Commands',
+};
diff --git a/commands/help.js b/commands/help.js
index eb53b40..9d94c80 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -1,70 +1,70 @@
-/****************************************
- *
- * Help: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-const Discord = require('discord.js');
-const fs = require('fs');
-module.exports.run = async (client, message) => {
- const categories = [];
- const commands = Array.from(client.commands.keys());
- const settings = require('../storage/settings.json');
- commands.forEach(function(x) {
- if (!categories.includes(client.commands.get(x).help.category)) {
- categories.push(client.commands.get(x).help.category);
- }
- });
-
- let prefixes = JSON.parse(fs.readFileSync("./storage/prefixes.json", "utf8"));
-
- if(!prefixes[message.guild.id]){
- prefixes[message.guild.id] = {
- prefixes: settings.prefix
- };
- }
-
- let prefix = prefixes[message.guild.id].prefixes
- if (!message.guild.member(client.user).hasPermission('EMBED_LINKS')) return message.reply('ERROR: AleeBot doesn\'t have the permission to send embed links please enable them to use the full help.');
- const embed = new Discord.RichEmbed()
- .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help and on ${client.guilds.size} servers`, client.user.avatarURL)
- .setDescription('Every command you input into AleeBot is `' + prefix + '`')
- .setColor('#1fd619')
- .setFooter('© Copyright 2017-2020 Alee Productions, Licensed with GPL-3.0');
-
- categories.forEach(function(x) {
- let cat = '';
- commands.forEach(function(command) {
- if (client.commands.get(command).help.category == x) {
- cat = cat + command + '\n';
- }
- });
- embed.addField(x, cat, true);
- });
-
- await message.channel.send({ embed });
-};
-
-exports.conf = {
- aliases: ['h'],
- guildOnly: false,
-};
-exports.help = {
- name: 'help',
- description: 'Displays all the commands or a page with information for 1 command.',
- usage: 'help (command:command-name)',
- category: '- General Commands',
-};
+/** **************************************
+ *
+ * Help: Command for AleeBot
+ * Copyright (C) 2017-2020 Alee Productions
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * *************************************/
+const Discord = require('discord.js');
+const fs = require('fs');
+module.exports.run = async (client, message) => {
+ const categories = [];
+ const commands = Array.from(client.commands.keys());
+ const settings = require('../storage/settings.json');
+ commands.forEach(function(x) {
+ if (!categories.includes(client.commands.get(x).help.category)) {
+ categories.push(client.commands.get(x).help.category);
+ }
+ });
+
+ const prefixes = JSON.parse(fs.readFileSync('./storage/prefixes.json', 'utf8'));
+
+ if (!prefixes[message.guild.id]) {
+ prefixes[message.guild.id] = {
+ prefixes: settings.prefix,
+ };
+ }
+
+ const prefix = prefixes[message.guild.id].prefixes;
+ if (!message.guild.member(client.user).hasPermission('EMBED_LINKS')) return message.reply('ERROR: AleeBot doesn\'t have the permission to send embed links please enable them to use the full help.');
+ const embed = new Discord.RichEmbed()
+ .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help and on ${client.guilds.size} servers`, client.user.avatarURL)
+ .setDescription('Every command you input into AleeBot is `' + prefix + '`')
+ .setColor('#1fd619')
+ .setFooter('© Copyright 2017-2020 Alee Productions, Licensed with GPL-3.0');
+
+ categories.forEach(function(x) {
+ let cat = '';
+ commands.forEach(function(command) {
+ if (client.commands.get(command).help.category == x) {
+ cat = cat + command + '\n';
+ }
+ });
+ embed.addField(x, cat, true);
+ });
+
+ await message.channel.send({embed});
+};
+
+exports.conf = {
+ aliases: ['h'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'help',
+ description: 'Displays all the commands or a page with information for 1 command.',
+ usage: 'help (command:command-name)',
+ category: '- General Commands',
+};
diff --git a/commands/info.js b/commands/info.js
index 162a1cf..5487a14 100644
--- a/commands/info.js
+++ b/commands/info.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Info: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,29 +15,28 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
- const os = require('os');
- const embed = new Discord.RichEmbed()
+ const Discord = require('discord.js');
+ const os = require('os');
+ const embed = new Discord.RichEmbed()
.setTitle('Information on AleeBot\'s Host')
- .addField('OS Hostname: ', os.hostname() , true)
- .addField('NodeJS Version: ', process.versions.node , true)
- .addField('OS Platform: ', os.platform() , true)
- .addField('OS Version: ', os.release() , true)
+ .addField('OS Hostname: ', os.hostname(), true)
+ .addField('NodeJS Version: ', process.versions.node, true)
+ .addField('OS Platform: ', os.platform(), true)
+ .addField('OS Version: ', os.release(), true)
.setColor('#1fd619');
- message.channel.send({embed});
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'info',
- description: 'Tells you information about the bot',
- usage: 'info',
- category: '- Information Commands',
- };
- \ No newline at end of file
+ message.channel.send({embed});
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'info',
+ description: 'Tells you information about the bot',
+ usage: 'info',
+ category: '- Information Commands',
+};
diff --git a/commands/interrogate.js b/commands/interrogate.js
index ea7de53..c015f2c 100644
--- a/commands/interrogate.js
+++ b/commands/interrogate.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Interrogate: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,29 +15,28 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply ('This is a ALP exclusive command.');
+ if (message.guild.id != '243022206437687296') return message.reply('This is a ALP exclusive command.');
- if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
- if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
+ if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
+ if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
- const member = message.mentions.members.first();
- if (!member) return await message.reply('Uhh... Please mention a member first.');
+ const member = message.mentions.members.first();
+ if (!member) return await message.reply('Uhh... Please mention a member first.');
- member.addRole(message.guild.roles.find('name', 'Interrogation'));
- message.reply(`Alright, I just interrogated ${member.user.tag}.`)
+ member.addRole(message.guild.roles.find('name', 'Interrogation'));
+ message.reply(`Alright, I just interrogated ${member.user.tag}.`);
};
exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'interrogate',
- description: 'Interrogates a member',
- usage: 'interrogate [user]',
- category: '- ALP Exclusive Commands',
- };
- \ No newline at end of file
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'interrogate',
+ description: 'Interrogates a member',
+ usage: 'interrogate [user]',
+ category: '- ALP Exclusive Commands',
+};
diff --git a/commands/invite.js b/commands/invite.js
index 38094b4..a6ce5a8 100644
--- a/commands/invite.js
+++ b/commands/invite.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Invite: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,37 +15,37 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
- const embed = new Discord.RichEmbed()
- message.channel.send({embed: {
+ const Discord = require('discord.js');
+ const embed = new Discord.RichEmbed();
+ message.channel.send({embed: {
color: 2086425,
- title: "Invite Command",
+ title: 'Invite Command',
fields: [{
- name: "Invite AleeBot",
- value: "[Invite AleeBot to your server.](https://top.gg/bot/282547024547545109)"
- },
- {
- name: "Join the Alee Productions Community",
- value: "[If there's any bugs you can join Alee Community guild and explain the bug...](https://discord.gg/EFhRDqG)"
- }
+ name: 'Invite AleeBot',
+ value: '[Invite AleeBot to your server.](https://top.gg/bot/282547024547545109)',
+ },
+ {
+ name: 'Join the Alee Productions Community',
+ value: '[If there\'s any bugs you can join Alee Community guild and explain the bug...](https://discord.gg/EFhRDqG)',
+ },
],
- }
-});
-
- // message.channel.send('Want AleeBot in your server? Here\'s the link: https://discordapp.com/api/oauth2/authorize?client_id=282547024547545109&permissions=2080375863&scope=bot');
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'invite',
- description: 'Gives you an invite to the guild and the bot.',
- usage: 'invite',
- category: '- General Commands',
- };
-
+ },
+ });
+
+ // message.channel.send('Want AleeBot in your server? Here\'s the link: https://discordapp.com/api/oauth2/authorize?client_id=282547024547545109&permissions=2080375863&scope=bot');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'invite',
+ description: 'Gives you an invite to the guild and the bot.',
+ usage: 'invite',
+ category: '- General Commands',
+};
+
diff --git a/commands/jail.js b/commands/jail.js
index e1ba85f..199ae20 100644
--- a/commands/jail.js
+++ b/commands/jail.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Jail: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,29 +15,28 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply ('This is a ALP exclusive command.');
+ if (message.guild.id != '243022206437687296') return message.reply('This is a ALP exclusive command.');
- if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
- if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
+ if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to jail members.');
+ if (!message.guild.member(client.user).hasPermission('MANAGE_ROLES')) return message.reply('Uhh... I don\'t have permission to jail members.');
- const member = message.mentions.members.first();
- if (!member) return await message.reply('Uhh... Please mention a member first.');
+ const member = message.mentions.members.first();
+ if (!member) return await message.reply('Uhh... Please mention a member first.');
- member.addRole(message.guild.roles.find('name', 'Jail'));
- message.reply(`Alright, I just jailed ${member.user.tag}.`)
+ member.addRole(message.guild.roles.find('name', 'Jail'));
+ message.reply(`Alright, I just jailed ${member.user.tag}.`);
};
exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'jail',
- description: 'Jails a member',
- usage: 'jail [user]',
- category: '- ALP Exclusive Commands',
- };
- \ No newline at end of file
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'jail',
+ description: 'Jails a member',
+ usage: 'jail [user]',
+ category: '- ALP Exclusive Commands',
+};
diff --git a/commands/kick.js b/commands/kick.js
index dbb1eb1..bfacd92 100644
--- a/commands/kick.js
+++ b/commands/kick.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Kick: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,23 +15,23 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- const Discord = require('discord.js');
- const mreason = args.join(" ").slice(22);
- if (!message.member.permissions.has('KICK_MEMBERS')) return message.reply("It looks like that you don't have the permissions to ban people.");
- if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Uhh... I don\'t have permission to kick members.');
- const member = message.mentions.members.first();
- if (!member) return message.reply("Uhh... Please mention a member first.");
- member.kick(`Kicked by: ${message.author.tag} Reason: ` + mreason);
- const embed = new Discord.RichEmbed()
- .setTitle('User Kicked!')
- .setColor('#1fd619')
- .addField('**User:**', `${member.user.tag}`)
- .addField('**Reason:**', `\`\`\`${mreason}\`\`\``)
- await message.channel.send({ embed });
- };
+ const Discord = require('discord.js');
+ const mreason = args.join(' ').slice(22);
+ if (!message.member.permissions.has('KICK_MEMBERS')) return message.reply('It looks like that you don\'t have the permissions to ban people.');
+ if (!message.guild.member(client.user).hasPermission('KICK_MEMBERS')) return message.reply('Uhh... I don\'t have permission to kick members.');
+ const member = message.mentions.members.first();
+ if (!member) return message.reply('Uhh... Please mention a member first.');
+ member.kick(`Kicked by: ${message.author.tag} Reason: ` + mreason);
+ const embed = new Discord.RichEmbed()
+ .setTitle('User Kicked!')
+ .setColor('#1fd619')
+ .addField('**User:**', `${member.user.tag}`)
+ .addField('**Reason:**', `\`\`\`${mreason}\`\`\``);
+ await message.channel.send({embed});
+};
exports.conf = {
aliases: [],
diff --git a/commands/leaveguild.js b/commands/leaveguild.js
index 4a77b0c..fd77509 100644
--- a/commands/leaveguild.js
+++ b/commands/leaveguild.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* LeaveGuild: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,22 +15,21 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- if (!['242775871059001344', message.guild.owner.user.id].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot or the owner of this guild to use this command.');
- message.channel.send('Alright, I\'m leaving the server now. Bye everyone!')
- message.guild.leave();
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'leaveguild',
- description: 'Makes the bot leave the server',
- usage: 'leaveguild',
- category: '- Owners Only',
- };
- \ No newline at end of file
+ if (!['242775871059001344', message.guild.owner.user.id].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot or the owner of this guild to use this command.');
+ message.channel.send('Alright, I\'m leaving the server now. Bye everyone!');
+ message.guild.leave();
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'leaveguild',
+ description: 'Makes the bot leave the server',
+ usage: 'leaveguild',
+ category: '- Owners Only',
+};
diff --git a/commands/pay.js b/commands/pay.js
index 633e4db..2d0aa89 100644
--- a/commands/pay.js
+++ b/commands/pay.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Pay: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,46 +15,46 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- const db = require('quick.db');
- if (!message.mentions.members.first()) return message.reply('Please mention a user...');
-
- let targetMember = message.mentions.members.first(),
- amount = parseInt(args.join(' ').replace(targetMember, ''));
-
- if (isNaN(amount)) return message.reply('Please define an amount.')
-
- let targetBalance = await db.fetch(`userBalance_${targetMember.id}`),
- selfBalance = await db.fetch(`userBalance_${message.author.id}`);
-
- if (targetBalance === null) {
- db.set(`userBalance_${targetMember.id}`, 0);
- targetBalance = 0
- }
-
- if (selfBalance === null) {
- db.set(`userBalance_${message.author.id}`, 0);
- selfBalance = 0
- }
-
- if (amount > selfBalance) return message.reply('Sorry you don\'t have enough money.');
-
- db.add(`userBalance_${targetMember.id}`, amount);
- db.subtract(`userBalance_${message.author.id}`, amount);
-
- message.reply(`Successfully transfered $${amount} to ${targetMember.user}`)
- };
-
- exports.conf = {
- aliases: ['transfer'],
- guildOnly: false,
- };
- exports.help = {
- name: 'pay',
- description: 'You can pay others!',
- usage: 'pay [@user] [interger]',
- category: '- Economy Commands',
- }; \ No newline at end of file
+ const db = require('quick.db');
+ if (!message.mentions.members.first()) return message.reply('Please mention a user...');
+
+ const targetMember = message.mentions.members.first();
+ const amount = parseInt(args.join(' ').replace(targetMember, ''));
+
+ if (isNaN(amount)) return message.reply('Please define an amount.');
+
+ let targetBalance = await db.fetch(`userBalance_${targetMember.id}`);
+ let selfBalance = await db.fetch(`userBalance_${message.author.id}`);
+
+ if (targetBalance === null) {
+ db.set(`userBalance_${targetMember.id}`, 0);
+ targetBalance = 0;
+ }
+
+ if (selfBalance === null) {
+ db.set(`userBalance_${message.author.id}`, 0);
+ selfBalance = 0;
+ }
+
+ if (amount > selfBalance) return message.reply('Sorry you don\'t have enough money.');
+
+ db.add(`userBalance_${targetMember.id}`, amount);
+ db.subtract(`userBalance_${message.author.id}`, amount);
+
+ message.reply(`Successfully transfered $${amount} to ${targetMember.user}`);
+};
+
+exports.conf = {
+ aliases: ['transfer'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'pay',
+ description: 'You can pay others!',
+ usage: 'pay [@user] [interger]',
+ category: '- Economy Commands',
+};
diff --git a/commands/ping.js b/commands/ping.js
index fa1fd10..afb3807 100644
--- a/commands/ping.js
+++ b/commands/ping.js
@@ -1,33 +1,33 @@
-/****************************************
- *
- * Ping: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-module.exports.run = async (client, message) => {
- message.reply('**PONG!** :ping_pong: ' + Math.round(client.ping) + ' ms');
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'ping',
- description: 'Ping the bot.',
- usage: 'ping',
- category: '- General Commands',
-};
+/** **************************************
+ *
+ * Ping: Command for AleeBot
+ * Copyright (C) 2017-2020 Alee Productions
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * *************************************/
+module.exports.run = async (client, message) => {
+ message.reply('**PONG!** :ping_pong: ' + Math.round(client.ping) + ' ms');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'ping',
+ description: 'Ping the bot.',
+ usage: 'ping',
+ category: '- General Commands',
+};
diff --git a/commands/poweroff.js b/commands/poweroff.js
index 3af23b8..3f60f8a 100644
--- a/commands/poweroff.js
+++ b/commands/poweroff.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Poweroff: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,29 +15,28 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
const Discord = require('discord.js');
- if (!['242775871059001344',].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
- const embed = new Discord.RichEmbed()
- .setAuthor("AleeBot Status", client.user.avatarURL)
- .setDescription("AleeBot is now going offline...")
- .setColor("#ff3333")
- await client.channels.find('id', '606602551634296968').send({embed});
- await message.reply(':warning: AleeBot will now exit!');
- client.destroy();
- process.exit(0);
- };
-
- exports.conf = {
- aliases: ['reboot'],
- guildOnly: false,
- };
- exports.help = {
- name: 'poweroff',
- description: 'Turns off AleeBot.',
- usage: 'poweroff',
- category: '- Owners Only',
- };
- \ No newline at end of file
+ if (!['242775871059001344'].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
+ const embed = new Discord.RichEmbed()
+ .setAuthor('AleeBot Status', client.user.avatarURL)
+ .setDescription('AleeBot is now going offline...')
+ .setColor('#ff3333');
+ await client.channels.find('id', '606602551634296968').send({embed});
+ await message.reply(':warning: AleeBot will now exit!');
+ client.destroy();
+ process.exit(0);
+};
+
+exports.conf = {
+ aliases: ['reboot'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'poweroff',
+ description: 'Turns off AleeBot.',
+ usage: 'poweroff',
+ category: '- Owners Only',
+};
diff --git a/commands/purge.js b/commands/purge.js
index 9a510f9..6122083 100644
--- a/commands/purge.js
+++ b/commands/purge.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Purge: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,26 +15,25 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (!message.member.permissions.has('MANAGE_MESSAGES')) return message.reply("It looks like that you don't have the permissions to delete messages.")
- if (isNaN(args[0])) return message.reply("Please put the valid number of messages to purge.");
+ if (!message.member.permissions.has('MANAGE_MESSAGES')) return message.reply('It looks like that you don\'t have the permissions to delete messages.');
+ if (isNaN(args[0])) return message.reply('Please put the valid number of messages to purge.');
+
+ if (args[0] > 100) return message.channel.send('Please put a number less than 100.');
- if (args[0] > 100) return message.channel.send("Please put a number less than 100.");
+ message.channel.bulkDelete(args[0])
+ .then( (messages) => message.channel.send(`Successfully deleted ${messages.size} messages.`));
+};
- message.channel.bulkDelete(args[0])
- .then( messages => message.channel.send(`Successfully deleted ${messages.size} messages.`))
- };
-
- exports.conf = {
- aliases: ['rm'],
- guildOnly: false,
- };
- exports.help = {
- name: 'purge',
- description: 'Removes messages in a bulk.',
- usage: 'purge [number]',
- category: '- Moderation Commands',
- };
- \ No newline at end of file
+exports.conf = {
+ aliases: ['rm'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'purge',
+ description: 'Removes messages in a bulk.',
+ usage: 'purge [number]',
+ category: '- Moderation Commands',
+};
diff --git a/commands/quote.js b/commands/quote.js
index 9aa9be0..ce7b56a 100644
--- a/commands/quote.js
+++ b/commands/quote.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Quote: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,16 +15,16 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
-const Discord = require('discord.js');
+ const Discord = require('discord.js');
-let NewQuote;
+ let NewQuote;
function GetNewQuote(quoteNum = -1) {
NewQuote = new Discord.RichEmbed();
-
+
let quo = require('../storage/quotes.json').quotes;
if (quoteNum == -1) {
@@ -47,19 +47,18 @@ let NewQuote;
return NewQuote;
}
- const newquote = GetNewQuote();
- message.reply('Alright, here\'s your quote.')
- message.channel.send(newquote);
+ const newquote = GetNewQuote();
+ message.reply('Alright, here\'s your quote.');
+ message.channel.send(newquote);
};
exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'quote',
- description: 'Tells you quotes',
- usage: 'quote',
- category: '- Quote Commands',
- };
- \ No newline at end of file
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'quote',
+ description: 'Tells you quotes',
+ usage: 'quote',
+ category: '- Quote Commands',
+};
diff --git a/commands/say.js b/commands/say.js
index 4f25aec..774e9e3 100644
--- a/commands/say.js
+++ b/commands/say.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Say: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,23 +15,22 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (!['242775871059001344',].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
- let absay = args.join(" ");
- message.delete().catch();
- message.channel.send(absay);
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'say',
- description: 'You can control AleeBot now!',
- usage: 'say [context]',
- category: '- Owners Only',
- };
- \ No newline at end of file
+ if (!['242775871059001344'].includes(message.author.id)) return message.reply('Nope! You need the person who created this bot to use this command.');
+ const absay = args.join(' ');
+ message.delete().catch();
+ message.channel.send(absay);
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'say',
+ description: 'You can control AleeBot now!',
+ usage: 'say [context]',
+ category: '- Owners Only',
+};
diff --git a/commands/setprefix.js b/commands/setprefix.js
index f9aac08..1c53509 100644
--- a/commands/setprefix.js
+++ b/commands/setprefix.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* SetPrefix: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,41 +15,38 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
const moment = require('moment');
- const log = message => {
-
+ 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 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>`);
- let 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]}`)
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: true,
- };
- exports.help = {
- name: 'setprefix',
- description: 'Sets the guild prefix.',
- usage: 'setprefix [prefix]',
- category: '- Settings Commands',
- };
- \ No newline at end of file
+ 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,
+};
+exports.help = {
+ name: 'setprefix',
+ description: 'Sets the guild prefix.',
+ usage: 'setprefix [prefix]',
+ category: '- Settings Commands',
+};
diff --git a/commands/suggest.js b/commands/suggest.js
index 1b2d814..6fb4289 100644
--- a/commands/suggest.js
+++ b/commands/suggest.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* Suggest: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,32 +15,31 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message, args) => {
- if (message.guild.id != '243022206437687296') return message.reply ('This is a ALP exclusive command.');
- const { RichEmbed } = require('discord.js');
- client.channels.find('id', '427495678390960148').send(
- new RichEmbed()
- .setColor ('#1fd619')
+ if (message.guild.id != '243022206437687296') return message.reply('This is a ALP exclusive command.');
+ const {RichEmbed} = require('discord.js');
+ client.channels.find('id', '427495678390960148').send(
+ new RichEmbed()
+ .setColor('#1fd619')
.setTitle('Suggestion')
.setDescription(`This is a suggestion from `+ message.author.username +` please react to it using the following emojis.`)
- .addField('Suggestion Contents', args.join(' '))
- ).then(message => {
- message.react('\u2705');
- message.react('\u274E');
- });
- message.reply("Your suggestion has been shown in the suggestions channel.")
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'suggest',
- description: 'Suggest a feature in ACN.',
- usage: 'suggest [suggestion]',
- category: '- ALP Exclusive Commands',
- };
- \ No newline at end of file
+ .addField('Suggestion Contents', args.join(' ')),
+ ).then((message) => {
+ message.react('\u2705');
+ message.react('\u274E');
+ });
+ message.reply('Your suggestion has been shown in the suggestions channel.');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'suggest',
+ description: 'Suggest a feature in ACN.',
+ usage: 'suggest [suggestion]',
+ category: '- ALP Exclusive Commands',
+};
diff --git a/commands/suggestfeature.js b/commands/suggestfeature.js
index 95e1c2d..fac82a6 100644
--- a/commands/suggestfeature.js
+++ b/commands/suggestfeature.js
@@ -19,6 +19,7 @@
* *************************************/
module.exports.run = async (client, message, args) => {
const { RichEmbed } = require('discord.js');
+
client.channels.find('id', '427495678390960148').send(
new RichEmbed()
.setColor ('#1fd619')
diff --git a/commands/uptime.js b/commands/uptime.js
index 7c8d9fe..8f97d02 100644
--- a/commands/uptime.js
+++ b/commands/uptime.js
@@ -1,45 +1,43 @@
-/****************************************
- *
- * Uptime: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions & OfficialRain
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * *************************************/
-module.exports.run = async (client, message) => {
-
- let uptime = parseInt(client.uptime);
- uptime = Math.floor(uptime / 1000);
- let uptimeMinutes = Math.floor(uptime / 60);
- const minutes = uptime % 60;
- let hours = 0;
- while (uptimeMinutes >= 60) {
- hours++;
- uptimeMinutes = uptimeMinutes - 60;
- }
- const uptimeSeconds = minutes % 60;
- message.channel.send(':clock3: AleeBot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.');
-
-};
-
-exports.conf = {
- aliases: [],
- guildOnly: false,
-};
-exports.help = {
- name: 'uptime',
- description: 'Displays Uptime.',
- usage: 'uptime',
- category: '- General Commands',
-};
+/** **************************************
+ *
+ * Uptime: Command for AleeBot
+ * Copyright (C) 2017-2020 Alee Productions & OfficialRain
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * *************************************/
+module.exports.run = async (client, message) => {
+ let uptime = parseInt(client.uptime);
+ uptime = Math.floor(uptime / 1000);
+ let uptimeMinutes = Math.floor(uptime / 60);
+ const minutes = uptime % 60;
+ let hours = 0;
+ while (uptimeMinutes >= 60) {
+ hours++;
+ uptimeMinutes = uptimeMinutes - 60;
+ }
+ const uptimeSeconds = minutes % 60;
+ message.channel.send(':clock3: AleeBot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'uptime',
+ description: 'Displays Uptime.',
+ usage: 'uptime',
+ category: '- General Commands',
+};
diff --git a/commands/userinfo.js b/commands/userinfo.js
index 2eebd8b..3b79beb 100644
--- a/commands/userinfo.js
+++ b/commands/userinfo.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* UserInfo: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,30 +15,28 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
- var embed = new Discord.RichEmbed()
- .setAuthor(message.author.tag, message.author.avatarURL)
- .setDescription("User Information")
- .setThumbnail(message.author.avatarURL)
- .addField("Names", "**Username:** " + message.author.username + "\n**Current Nickname:** " + message.member.displayName)
- .addField("Identity", `**User ID:** ${message.author.id} `)
- .addField("Create and Join Times", "**Created At:** " + message.member.user.createdAt.toUTCString() + "\n**Joined Guild At:** " + message.member.joinedAt.toUTCString())
- .setColor('#1fd619')
- message.channel.send({embed});
+ const Discord = require('discord.js');
+ const embed = new Discord.RichEmbed()
+ .setAuthor(message.author.tag, message.author.avatarURL)
+ .setDescription('User Information')
+ .setThumbnail(message.author.avatarURL)
+ .addField('Names', '**Username:** ' + message.author.username + '\n**Current Nickname:** ' + message.member.displayName)
+ .addField('Identity', `**User ID:** ${message.author.id} `)
+ .addField('Create and Join Times', '**Created At:** ' + message.member.user.createdAt.toUTCString() + '\n**Joined Guild At:** ' + message.member.joinedAt.toUTCString())
+ .setColor('#1fd619');
+ message.channel.send({embed});
+};
- };
-
- exports.conf = {
- aliases: ['uinfo'],
- guildOnly: false,
- };
- exports.help = {
- name: 'userinfo',
- description: 'Tells your info.',
- usage: 'userinfo',
- category: '- Information Commands',
- };
- \ No newline at end of file
+exports.conf = {
+ aliases: ['uinfo'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'userinfo',
+ description: 'Tells your info.',
+ usage: 'userinfo',
+ category: '- Information Commands',
+};
diff --git a/commands/vtquote.js b/commands/vtquote.js
index e21db08..7d1ccd0 100644
--- a/commands/vtquote.js
+++ b/commands/vtquote.js
@@ -1,5 +1,5 @@
-/****************************************
- *
+/** **************************************
+ *
* VTQuote: Command for AleeBot
* Copyright (C) 2017-2020 Alee Productions
*
@@ -15,51 +15,50 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
* *************************************/
module.exports.run = async (client, message) => {
- const Discord = require('discord.js');
-
- let VictorQuote;
-
- function GetVictorQuote(quoteNum = -1) {
- VictorQuote = new Discord.RichEmbed();
-
- let quo = require('../storage/vtquotes.json').quotes
-
- if (quoteNum == -1) {
- quoteNum = Math.floor(Math.random() * 1000) % quo.length;
- quo=quo[quoteNum];
- }
-
- const author = quo.author;
- const authorImage = quo.authorImage;
- const quote = quo.quote;
- const year = quo.year;
- const url = quo.url;
-
- VictorQuote.setAuthor(author, authorImage);
- VictorQuote.setColor('#1fd619');
- VictorQuote.setDescription(quote);
- VictorQuote.setFooter('- ' + year);
- VictorQuote.setURL(url);
-
- return VictorQuote;
- }
-
- const victorquote = GetVictorQuote();
- message.reply('Alright, here\'s your Victor quote.')
- message.channel.send(victorquote);
- };
-
- exports.conf = {
- aliases: [],
- guildOnly: false,
- };
- exports.help = {
- name: 'vtquote',
- description: 'Tells you quotes when victor accidentaly swore.',
- usage: 'vtquote',
- category: '- Quote Commands',
- };
- \ No newline at end of file
+ const Discord = require('discord.js');
+
+ let VictorQuote;
+
+ function GetVictorQuote(quoteNum = -1) {
+ VictorQuote = new Discord.RichEmbed();
+
+ let quo = require('../storage/vtquotes.json').quotes;
+
+ if (quoteNum == -1) {
+ quoteNum = Math.floor(Math.random() * 1000) % quo.length;
+ quo=quo[quoteNum];
+ }
+
+ const author = quo.author;
+ const authorImage = quo.authorImage;
+ const quote = quo.quote;
+ const year = quo.year;
+ const url = quo.url;
+
+ VictorQuote.setAuthor(author, authorImage);
+ VictorQuote.setColor('#1fd619');
+ VictorQuote.setDescription(quote);
+ VictorQuote.setFooter('- ' + year);
+ VictorQuote.setURL(url);
+
+ return VictorQuote;
+ }
+
+ const victorquote = GetVictorQuote();
+ message.reply('Alright, here\'s your Victor quote.');
+ message.channel.send(victorquote);
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'vtquote',
+ description: 'Tells you quotes when victor accidentaly swore.',
+ usage: 'vtquote',
+ category: '- Quote Commands',
+};