Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (message.content.includes('')) {
- if (message.content.includes(row.prefix)) return
- if (row.automoderation === "disabled") return;
- if (row.dupcharactersprotection === "disabled") return;
- } else {
- if (row.dupcharctersprotection === "enabled") {
- //if (message.member.hasPermission("KICK_MEMBERS")) return;
- const check1 = args.join(" ")
- if (check1.includes('.')) return;
- var hasDuplicates = /([a-zA-Z])\1+$/;
- const result = hasDuplicates.test(check1)
- if (result === true) {
- message.delete()
- let modlog = message.guild.channels.find(channel => channel.name == row.logschannel);
- const embed = new Discord.RichEmbed()
- .setColor(0x00A2E8)
- .setTitle("Action: Auto Moderation")
- .addField("Moderator", client.user.username + " (ID: " + client.user.id + ")")
- .addField("User", message.author.username + " (ID: " + message.author.id + ")")
- .addField("In channel", message.channel.name, true)
- .addField("Reason", "Duplicated Characters", true)
- .addField("Message Content", message.cleanContent)
- .setFooter("Time used: " + message.createdAt.toDateString())
- if (!modlog) return;
- if (row.logsenabled === "disabled") return;
- client.channels.get(modlog.id).send({embed});
- let user = message.guild.member(message.mentions.users.first())
- message.reply(" message contains duplicated characters.").then((response) => {
- response.delete(6000);
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement