don't let new account use this command

This commit is contained in:
loicbersier 2019-10-05 22:17:19 +02:00
parent cebc55cd05
commit 68a45d5de6

View file

@ -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()