From 68a45d5de6676f50ba6e1d64fa61d2071ab68067 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 5 Oct 2019 22:17:19 +0200 Subject: [PATCH] don't let new account use this command --- commands/utility/feedback.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/utility/feedback.js b/commands/utility/feedback.js index c09279d..ad60a01 100644 --- a/commands/utility/feedback.js +++ b/commands/utility/feedback.js @@ -26,6 +26,12 @@ class FeedbackCommand extends Command { } async exec(message,args) { + // Don't let account new account use this command to prevent spam + let date = new Date(); + if (message.author.createdAt > date.setDate(date.getDate() - 7)) { + return message.channel.send('Your account is too new to be able to use this command!'); + } + const channel = this.client.channels.get(feedbackChannel); const Embed = new MessageEmbed()