aboutsummaryrefslogtreecommitdiff
path: root/commands/Owners Only
diff options
context:
space:
mode:
authorJustin <jtsshieh@outlook.com>2019-10-30 22:28:49 -0400
committerJustin <jtsshieh@outlook.com>2019-10-30 22:28:49 -0400
commit2c3bf24f5996753df4a2d4456949fc0b636f6366 (patch)
tree27700e9b0557d23a6fb0cbd9d4058d60d725caa0 /commands/Owners Only
parent5d778acf2066546de30f53d4d10c92a043a44a3a (diff)
downloadPokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.tar.gz
PokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.tar.bz2
PokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.zip
Added an optional checkPermission function and upgraded quick.db.
Diffstat (limited to 'commands/Owners Only')
-rw-r--r--commands/Owners Only/eval.js6
-rw-r--r--commands/Owners Only/leaveguild.js6
-rw-r--r--commands/Owners Only/modifycredits.js7
-rw-r--r--commands/Owners Only/poweroff.js18
-rw-r--r--commands/Owners Only/say.js14
-rw-r--r--commands/Owners Only/testingcredits.js7
6 files changed, 36 insertions, 22 deletions
diff --git a/commands/Owners Only/eval.js b/commands/Owners Only/eval.js
index 09aac08..5153b63 100644
--- a/commands/Owners Only/eval.js
+++ b/commands/Owners Only/eval.js
@@ -8,7 +8,6 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot to use this command.');
const { RichEmbed } = require('discord.js');
const code = args.join(' ');
@@ -63,6 +62,11 @@ exports.run = async (bot, msg, args) => {
}
};
+exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+}
+
exports.conf = {
aliases: ['exec'],
guildOnly: false,
diff --git a/commands/Owners Only/leaveguild.js b/commands/Owners Only/leaveguild.js
index 2af5244..f214b8b 100644
--- a/commands/Owners Only/leaveguild.js
+++ b/commands/Owners Only/leaveguild.js
@@ -7,11 +7,15 @@
*
* *************************************/
module.exports.run = async (bot, msg) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409', msg.guild.owner.user.id].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot or the owner of this guild to use this command.');
msg.channel.send('Alright, I\'m leaving the server now. Bye everyone!')
msg.guild.leave();
};
+ exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+ }
+
exports.conf = {
aliases: [],
guildOnly: true,
diff --git a/commands/Owners Only/modifycredits.js b/commands/Owners Only/modifycredits.js
index 050d74d..6ec7506 100644
--- a/commands/Owners Only/modifycredits.js
+++ b/commands/Owners Only/modifycredits.js
@@ -8,8 +8,6 @@
* *************************************/
exports.run = async (bot, msg) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409', '269516487566426112'].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot to use this command.');
-
let user;
if (!msg.mentions.users.first()) {
user = msg.author;
@@ -24,6 +22,11 @@ exports.run = async (bot, msg) => {
msg.channel.send(`Reset ${user.tag}'s credits.`);
};
+exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+}
+
exports.conf = {
aliases: [],
guildOnly: true,
diff --git a/commands/Owners Only/poweroff.js b/commands/Owners Only/poweroff.js
index e369b0a..3d2cbdd 100644
--- a/commands/Owners Only/poweroff.js
+++ b/commands/Owners Only/poweroff.js
@@ -8,17 +8,17 @@
* *************************************/
exports.run = async (bot, msg) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) {
- msg.reply('Nope! You need the person who created this bot to use this command.');
- }
- else {
- await msg.reply(':warning: Pokebot is now powering off!');
- await bot.user.setStatus('invisible')
- console.log('Pokebot is now powering off...');
- process.exit(0);
- }
+ await msg.reply(':warning: Pokebot is now powering off!');
+ await bot.user.setStatus('invisible')
+ console.log('Pokebot is now powering off...');
+ process.exit(0);
};
+exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+}
+
exports.conf = {
aliases: ['reboot', 'restart'],
guildOnly: true,
diff --git a/commands/Owners Only/say.js b/commands/Owners Only/say.js
index 3085d53..ace2874 100644
--- a/commands/Owners Only/say.js
+++ b/commands/Owners Only/say.js
@@ -8,15 +8,15 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409', '269516487566426112'].includes(msg.author.id)) {
- msg.reply('Nope! You need the person who created this bot to use this command.');
- }
- else {
- msg.channel.send(args.join(' '));
- msg.delete();
- }
+ msg.channel.send(args.join(' '));
+ msg.delete();
};
+exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+}
+
exports.conf = {
aliases: [],
guildOnly: true,
diff --git a/commands/Owners Only/testingcredits.js b/commands/Owners Only/testingcredits.js
index bee93b2..85cc859 100644
--- a/commands/Owners Only/testingcredits.js
+++ b/commands/Owners Only/testingcredits.js
@@ -8,8 +8,6 @@
* *************************************/
exports.run = async (bot, msg) => {
- if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(msg.author.id)) return msg.reply('Nope! You need the person who created this bot to use this command.');
-
let user;
if (!msg.mentions.members.first()) {
user = msg.author;
@@ -22,6 +20,11 @@ exports.run = async (bot, msg) => {
msg.channel.send('Added 1000 credits');
};
+exports.checkPermission = (bot, member) => {
+ if (!['242775871059001344', '247221105515823104', '236279900728721409'].includes(member.id)) return false;
+ return true;
+}
+
exports.conf = {
aliases: [],
guildOnly: true,