diff --git a/README.md b/README.md index c9dd874..1a3da18 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,7 @@ Example of a basic bot handling spam messages using this module. ```js const { Client, GatewayIntentBits, Partial } = require("discord.js"); const client = new Client({ - intents: [ - GatewayIntentBits.FLAGS.GUILDS, - GatewayIntentBits.FLAGS.GUILD_MESSAGES, - ], + intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages], partials: [Partials.Channel], }); const AntiSpam = require("discord-anti-spam"); @@ -42,6 +39,7 @@ const antiSpam = new AntiSpam({ unMuteTime: 60, // Time in minutes before the user will be able to send messages again. verbose: true, // Whether or not to log every action in the console. removeMessages: true, // Whether or not to remove all messages sent by the user. + ignoredPermissions: [PermissionFlagsBits.Administrator], // If the user has the following permissions, ignore him. // For more options, see the documentation: }); diff --git a/docs/global.html b/docs/global.html index b8d9c37..4f71f51 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2106,7 +2106,7 @@
Users with at least one of these permissions will be ignored.
Users with at least one of these permissions will be ignored. Please use the PermissionFlagsBits function. (https://discord.js.org/#/docs/discord.js/main/class/PermissionsBitField?scrollTo=s-Flags)
Example of a basic bot handling spam messages using this module.
const { Client, GatewayIntentBits, Partial } = require("discord.js");
const client = new Client({
- intents: [
- GatewayIntentBits.FLAGS.GUILDS,
- GatewayIntentBits.FLAGS.GUILD_MESSAGES,
- ],
+ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
partials: [Partials.Channel],
});
const AntiSpam = require("discord-anti-spam");
@@ -80,6 +77,7 @@ Example
unMuteTime: 60, // Time in minutes before the user will be able to send messages again.
verbose: true, // Whether or not to log every action in the console.
removeMessages: true, // Whether or not to remove all messages sent by the user.
+ ignoredPermissions: [PermissionFlagsBits.Administrator], // If the user has the following permissions, ignore him.
// For more options, see the documentation:
});
diff --git a/index.js b/index.js
index 7c86e1f..aa0fd92 100644
--- a/index.js
+++ b/index.js
@@ -105,7 +105,7 @@ const { EventEmitter } = require("events");
* @property {Discord.Snowflake|string[]|IgnoreRoleFunction} [ignoredRoles=[]] Array of role IDs or role names that are ignored. Members with one of these roles will be ignored.
* @property {Discord.Snowflake|string[]|IgnoreGuildFunction} [ignoredGuilds=[]] Array of guild IDs or guild names that are ignored.
* @property {Discord.Snowflake|string[]|IgnoreChannelFunction} [ignoredChannels=[]] Array of channel IDs or channel names that are ignored.
- * @property {Discord.PermissionString[]} [ignoredPermissions=[]] Users with at least one of these permissions will be ignored.
+ * @property {Discord.PermissionString[]} [ignoredPermissions=[]] Users with at least one of these permissions will be ignored. Please use the PermissionFlagsBits function. (https://discord.js.org/#/docs/discord.js/main/class/PermissionsBitField?scrollTo=s-Flags)
* @property {boolean} [ignoreBots=true] Whether bots should be ignored.
*
* @property {boolean} [warnEnabled=true] Whether warn sanction is enabled.