0.0.5 • Published 4 years ago
extended-antiraid v0.0.5
Extended-AntiRaid
Thanks to Derp for original project | NPM Link
Installation:
npm i extended-antiraid
Exemple:
const { Client } = require("discord.js"); // Import Client from discord.js package
const { AntiRaid } = require("extended-antiraid"); // Import antiRaid from extended-antiraid package
const client = new Client(); // Define the client
const antiRaid = new AntiRaid(client, {
actions: 3, // Number of actions
time: 15000, // Time to get actions (in milliseconds)
punishmentType: "removeRole", // The punishment type (ban, kick, editRole, removeRole)
verbose: true, // Extended Logs from module
ignoredUsers: [], // Users ignored by module
ignoredRoles: [], // Roles ignored by module
ignoredEvents: [] // Events ignored by module
});
antiRaid.on("trying", (member, event, punishType) => {
console.log(`I will trying do ${punishType} to stop ${member.user.tag} for ${event}`);
});
antiRaid.on("action", (member, type) => {
console.log(`${member.user.tag} has been ${type}`);
});
client.on("ready", (client) => {
console.log(`${client.user.tag} is now ready !`);
});
client.login("token");