diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-01 20:37:34 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-01 20:37:34 -0400 |
commit | 2b06a59c57fdf7aad217d63db875cdb3d8868036 (patch) | |
tree | 76fc9ff0f4217c5c4c3a37291dbb8e589da25bcc /src/inhibitors/noCache.ts | |
parent | ad26ae36bc57ad4fb77c6c3c3e86eb3303f09110 (diff) | |
download | tanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.tar.gz tanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.tar.bz2 tanzanite-2b06a59c57fdf7aad217d63db875cdb3d8868036.zip |
don't judge me part 2 & fix esbuild with eval command
Diffstat (limited to 'src/inhibitors/noCache.ts')
-rw-r--r-- | src/inhibitors/noCache.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/inhibitors/noCache.ts b/src/inhibitors/noCache.ts index fe2e522..db46801 100644 --- a/src/inhibitors/noCache.ts +++ b/src/inhibitors/noCache.ts @@ -2,8 +2,8 @@ import { BushInhibitor } from '../lib/extensions/discord-akairo/BushInhibitor'; import { BushSlashMessage } from '../lib/extensions/discord-akairo/BushSlashMessage'; import { BushMessage } from '../lib/extensions/discord.js/BushMessage'; -export default class noCacheInhibitor extends BushInhibitor { - constructor() { +export default class NoCacheInhibitor extends BushInhibitor { + public constructor() { super('noCache', { reason: 'noCache', type: 'all', @@ -14,7 +14,10 @@ export default class noCacheInhibitor extends BushInhibitor { public async exec(message: BushMessage | BushSlashMessage): Promise<boolean> { if (this.client.isOwner(message.author)) return false; for (const property in this.client.cache) { - if (property === undefined || property === null) return true; + if (property === undefined || property === null) { + this.client.console.debug(`NoCacheInhibitor blocked message.`); + return true; + } } return false; } |