aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/noCache.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/inhibitors/noCache.ts')
-rw-r--r--src/inhibitors/noCache.ts9
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;
}