Facebook
From Alpha, 3 Years ago, written in JavaScript.
This paste is a reply to AntiSpam.js from Alpha - view diff
Embed
Download Paste or View Raw
Hits: 166
  1. const Discord = require("discord.js");
  2. const client = new Discord.Client();
  3. const DiscordAntiSpam = require("discord-anti-spam");
  4. const AntiSpam = new DiscordAntiSpam({
  5.  
  6.   banThreshold: 5,
  7.   warnThreshold: 3,
  8.   maxInterval: 2000,
  9.   warnMessage: "{@user}, Lütfen ``spam` atmayı kes.", // Uyarı mesajı ne yazmasını istiyorsanız onu yazın.
  10.   banMessage: "**{user_tag}** `Spam` atmayı kesmediği için banlandı.", // Ban mesajı istediginiz gibi editleyin.
  11.   maxDuplicatesBan: 10,
  12.   maxDuplicatesWarning: 7,
  13.   deleteMessagesAfterBanForPastDays: 1,
  14.   ignoredGuilds: [],
  15.   ignoredUsers: [],
  16.   exemptPermissions: ["MANAGE_MESSAGES", "ADMINISTRATOR", "MANAGE_GUILD", "BAN_MEMBERS"],
  17.   client: client,
  18.   ignoreBots: true,
  19.   verbose: false,
  20.   ignoredGuilds: [],
  21.   ignoredUsers: []
  22.  
  23. });
  24.  
  25. AntiSpam.on("warnEmit", (member) => console.log(`Attempt to warn ${member.user.tag}.`));
  26. AntiSpam.on("warnAdd", (member) => console.log(`${member.user.tag} has been warned.`));
  27. AntiSpam.on("banEmit", (member) => console.log(`Attempt to ban ${member.user.tag}.`));
  28. AntiSpam.on("banAdd", (member) => console.log(`${member.user.tag} has been banned.`));
  29. AntiSpam.on("dataReset", () => console.log("Module cache has been cleared."));
  30.  
  31. client.on("ready", () => console.log(`Logged in as ${client.user.tag}.`));
  32.  
  33. client.on("message", (msg) => {
  34.   AntiSpam.message(msg);
  35. });
  36.  
  37.   //Parexse Ayitir Çalmayın