@@ -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
0 commit comments