From 0a538eecb4c33e6d693381da72048574eebc1875 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 1 Apr 2019 19:11:15 +0000 Subject: [PATCH] Add verification --- commands/other/rename-all.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/other/rename-all.js b/commands/other/rename-all.js index 8a860272..6860ce85 100644 --- a/commands/other/rename-all.js +++ b/commands/other/rename-all.js @@ -1,4 +1,5 @@ const Command = require('../../structures/Command'); +const { verify } = require('../../util/Util'); module.exports = class RenameAllCommand extends Command { constructor(client) { @@ -30,6 +31,11 @@ module.exports = class RenameAllCommand extends Command { async run(msg, { nickname }) { try { + await msg.reply( + `Are you sure you want to ${nickname ? `rename everyone to **${nickname}**` : 'remove all nicknames'}?` + ); + const verification = await verify(msg.channel, msg.author); + if (!verification) return msg.say('Aborted.'); await msg.reply('Fetching members...'); await msg.guild.members.fetch(); await msg.reply('Fetched members! Renaming...');