aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/noCache.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-24 00:56:16 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-24 00:56:16 -0400
commit4176b6258e44e4a095376aaf0f4c687244243a69 (patch)
tree3b9144be9a2045483c90d92fff05b3ca0b288e52 /src/inhibitors/noCache.ts
parente80446e23060c0325bbd6db620920d86694ec3ce (diff)
downloadtanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.tar.gz
tanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.tar.bz2
tanzanite-4176b6258e44e4a095376aaf0f4c687244243a69.zip
feat(*): Began working on other punishment commands etc
Diffstat (limited to 'src/inhibitors/noCache.ts')
-rw-r--r--src/inhibitors/noCache.ts21
1 files changed, 21 insertions, 0 deletions
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<boolean> {
+ if (this.client.isOwner(message.author)) return false;
+ for (const property in this.client.cache) {
+ if (property === undefined || property === null) return true;
+ }
+ return false;
+ }
+}