From 4176b6258e44e4a095376aaf0f4c687244243a69 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 24 Jun 2021 00:56:16 -0400 Subject: feat(*): Began working on other punishment commands etc --- src/inhibitors/noCache.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/inhibitors/noCache.ts (limited to 'src/inhibitors/noCache.ts') diff --git a/src/inhibitors/noCache.ts b/src/inhibitors/noCache.ts new file mode 100644 index 0000000..61f0b3e --- /dev/null +++ b/src/inhibitors/noCache.ts @@ -0,0 +1,21 @@ +import { BushInhibitor } from '../lib/extensions/BushInhibitor'; +import { BushSlashMessage } from '../lib/extensions/BushInteractionMessage'; +import { BushMessage } from '../lib/extensions/BushMessage'; + +export default class noCacheInhibitor extends BushInhibitor { + constructor() { + super('noCache', { + reason: 'noCache', + type: 'all', + priority: 100 + }); + } + + public async exec(message: BushMessage | BushSlashMessage): Promise { + if (this.client.isOwner(message.author)) return false; + for (const property in this.client.cache) { + if (property === undefined || property === null) return true; + } + return false; + } +} -- cgit