From 052c72eb17bdb17a8f8522e1bf127db230f5e623 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 26 Feb 2020 06:56:22 +0100 Subject: [PATCH] Don't allow tweet with discord.gg --- commands/general/tweet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/general/tweet.js b/commands/general/tweet.js index 896fb530..e8670b9a 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -37,6 +37,7 @@ class tweetCommand extends Command { let Attachment = (message.attachments).array(); // see if user is not banned const blacklist = await TwitterBlacklist.findOne({where: {userID:message.author.id}}); + if (blacklist) { return message.channel.send(`You have been blacklisted for the following reasons: \`\`${blacklist.get('reason')}\`\` be less naughty less time.`); } @@ -50,6 +51,8 @@ class tweetCommand extends Command { 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!'); } + + if (args.text.includes('discord.gg')) return message.channel.send('No discord invite allowed.'); if (!Attachment[0] && !args.text) return message.channel.send('You need to input something for me to tweet!');