secure dev commands

master
Kit Kasune 4 years ago
parent 680d516dac
commit 4c415ecf8a
  1. 2
      commands/dev/admin.js
  2. 2
      commands/dev/developer.js
  3. 2
      commands/dev/staff.js
  4. 2
      commands/dev/support.js

@ -23,7 +23,7 @@ module.exports = {
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as an admin.");}
if (!person) {return message.reply("You must mention someone to add as an admin, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set admin statuses.');}
if ((!atu || !atu.developer) && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set admin statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true; tu.admin = true;}
else {tu.admin = false; tu.developer = false;}
tu.save();

@ -25,7 +25,7 @@ module.exports = {
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a developer.");}
if (!person) {return message.reply("You must mention someone to add as a developer, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add or remove someone else as a developer.');}
if ((!atu || !atu.developer) && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add or remove someone else as a developer.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true; tu.admin = true; tu.developer = true;}
else {tu.developer = false;}
tu.save();

@ -23,7 +23,7 @@ module.exports = {
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Staff Member.");}
if (!person) {return message.reply("You must mention someone to add as a staff member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set staff member statuses.');}
if ((!atu || !atu.developer) && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set staff member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true;}
else {tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();

@ -23,7 +23,7 @@ module.exports = {
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Support Team Member.");}
if (!person) {return message.reply("You must mention someone to add as a support member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.admin) {return message.reply('You must be an admin in order to add set support team member statuses.');}
if (!atu || !atu.admin) {return message.reply('You must be an admin in order to add set support team member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true;}
else {tu.support = false; tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();

Loading…
Cancel
Save