From e63c933735fbe44633d26569d1d21f64ed8d5f3c Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Sun, 11 Oct 2020 17:16:49 -0600 Subject: [PATCH] finish n?dev --- commands/developer.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/commands/developer.js b/commands/developer.js index 17374ad..b5024ab 100644 --- a/commands/developer.js +++ b/commands/developer.js @@ -19,5 +19,17 @@ module.exports = { let tu = await UserData.findOne({uid: person.id}) ? await UserData.findOne({uid: person.id}) : new UserData({uid: person.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.');} + tu.developer = ['a', 'add'].includes(args[0]); + const logemb = (act) => new Discord.MessageEmbed() + .setAuthor(`Developer ${act}`, message.author.avatarURL()) + .setDescription("A user's Developer status was updated.") + .setThumbnail(message.guild.iconURL({size: 1024})) + .addField("Name", person.username, true) + .addField("Admin", message.author.username, true) + .setColor("e8da3a") + .setFooter("Natsuki") + .setTimestamp(); + logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'); + return message.reply(`<@${person.id}> is now a developer!`); } }; \ No newline at end of file