Skip to content

Commit

Permalink
Update docs and ignorepermissions method
Browse files Browse the repository at this point in the history
  • Loading branch information
Scraayp committed Jul 26, 2022
1 parent e00d50e commit 5dd0d07
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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:
});

Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ <h5 class="subsection-title">Properties:</h5>
</td>


<td class="description last"><p>Users with at least one of these permissions will be ignored.</p></td>
<td class="description last"><p>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)</p></td>
</tr>


Expand Down
6 changes: 2 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ <h2>Example</h2>
<p>Example of a basic bot handling spam messages using this module.</p>
<pre class="prettyprint source lang-js"><code>const { Client, GatewayIntentBits, Partial } = require(&quot;discord.js&quot;);
const client = new Client({
intents: [
GatewayIntentBits.FLAGS.GUILDS,
GatewayIntentBits.FLAGS.GUILD_MESSAGES,
],
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
partials: [Partials.Channel],
});
const AntiSpam = require(&quot;discord-anti-spam&quot;);
Expand All @@ -80,6 +77,7 @@ <h2>Example</h2>
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:
});

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5dd0d07

Please sign in to comment.