From cebc55cd055f2b1f4fa412fe6d9432379d8e3c87 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 5 Oct 2019 22:14:23 +0200 Subject: [PATCH] some spam prevention --- commands/general/tweet.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/general/tweet.js b/commands/general/tweet.js index cb39b5f1..9e569147 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -38,6 +38,12 @@ class tweetCommand extends Command { filter.removeWords(...uncensor); */ + // 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 blacklist = reload('../../json/twiBlacklist.json'); if (blacklist.includes(message.author.id)) {