This commit is contained in:
Daniel Odendahl Jr
2017-06-24 16:44:46 +00:00
parent 181da1a186
commit 82a7cb7a81
+4 -2
View File
@@ -57,8 +57,10 @@ client.on('message', (msg) => {
if (msg.author.bot || msg.member.hasPermission('ADMINISTRATOR')) return;
const topic = msg.guild.defaultChannel.topic || '';
if (!topic.includes('<inviteguard>')) return;
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete();
msg.reply('Invites are prohibited from being posted here.');
if (/(discord(\.gg\/|app\.com\/invite\/|\.me\/))/gi.test(msg.content)) {
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) msg.delete();
msg.reply('Invites are prohibited from being posted here.');
}
});
client.on('guildMemberAdd', (member) => {