Skip to content

Commit 13c2899

Browse files
authored
Merge pull request #158 from Michael-J-Scofield/development
v2.7.2
2 parents d6420a0 + 1188a64 commit 13c2899

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

index.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class AntiSpamClient extends EventEmitter {
201201
bannedUsers: []
202202
}
203203

204-
this.guildOptions = {}
204+
// this.guildOptions = {}
205205
}
206206

207207
/**
@@ -448,9 +448,9 @@ class AntiSpamClient extends EventEmitter {
448448
* @returns {Object} The options for the guild.
449449
*/
450450

451-
getOptions (guild) {
452-
return this.guildOptions[guild.id] || this.options
453-
}
451+
// getOptions (guild) {
452+
// return this.guildOptions[guild.id] || this.options
453+
// }
454454

455455
/**
456456
* Checks a message.
@@ -462,7 +462,7 @@ class AntiSpamClient extends EventEmitter {
462462
* });
463463
*/
464464
async message (message) {
465-
const options = this.getOptions(message.guild)
465+
const { options } = this
466466

467467
if (
468468
!message.guild ||
@@ -584,31 +584,31 @@ class AntiSpamClient extends EventEmitter {
584584
return true
585585
}
586586

587-
/**
588-
* Add GuildOptions for a guild to use instead of the default options.
589-
* @param {Discord.Guild} guild The guild to add the options for.
590-
* @param {AntiSpamClientOptions} options The options to use for the guild.
591-
* @returns {boolean} Whether the options have been added.
592-
*/
593-
addGuildOptions (guild, options) {
594-
const guildId = guild.id
587+
// /**
588+
// * Add GuildOptions for a guild to use instead of the default options.
589+
// * @param {Discord.Guild} guild The guild to add the options for.
590+
// * @param {AntiSpamClientOptions} options The options to use for the guild.
591+
// * @returns {boolean} Whether the options have been added.
592+
// */
593+
// addGuildOptions (guild, options) {
594+
// const guildId = guild.id
595595

596-
if (this.guildOptions.has(guildId)) { // Check if the guild already has options
596+
// if (this.guildOptions.has(guildId)) { // Check if the guild already has options
597597

598-
for ([setting, value] of options.entries()) { // If they do iterate over the settings and their values
599-
this.guildOptions.guildId[setting] = value // And now write them, this avoids overwriting the value set for options not mentioned.
598+
// for ([setting, value] of options.entries()) { // If they do iterate over the settings and their values
599+
// this.guildOptions.guildId[setting] = value // And now write them, this avoids overwriting the value set for options not mentioned.
600600

601-
}
601+
// }
602602

603-
return true
603+
// return true
604604

605-
} else {
605+
// } else {
606606

607-
this.guildOptions.set(guildId, options)
608-
return true
607+
// this.guildOptions.set(guildId, options)
608+
// return true
609609

610-
}
611-
}
610+
// }
611+
// }
612612

613613
/**
614614
* Reset the cache of this AntiSpam client instance.
@@ -623,4 +623,4 @@ class AntiSpamClient extends EventEmitter {
623623
}
624624
}
625625

626-
module.exports = AntiSpamClient
626+
module.exports = AntiSpamClient

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discord-anti-spam",
3-
"version": "2.7.1",
3+
"version": "2.7.2",
44
"description": "An easy to setup package that help you integration of anti-spam feature in your discord bot.",
55
"main": "index.js",
66
"scripts": {
@@ -31,5 +31,8 @@
3131
"devDependencies": {
3232
"jsdoc": "^3.6.3",
3333
"minami": "Androz2091/minami"
34+
},
35+
"dependencies": {
36+
"discord.js": "^13.6.0"
3437
}
3538
}

0 commit comments

Comments
 (0)