aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils
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/lib/utils
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/lib/utils')
-rw-r--r--src/lib/utils/BushCache.ts6
-rw-r--r--src/lib/utils/BushLogger.ts8
-rw-r--r--src/lib/utils/CanvasProgressBar.ts10
3 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/utils/BushCache.ts b/src/lib/utils/BushCache.ts
index 947b15d..ffef470 100644
--- a/src/lib/utils/BushCache.ts
+++ b/src/lib/utils/BushCache.ts
@@ -1,9 +1,13 @@
import { Snowflake } from 'discord.js';
-export class BushCache {
+class GlobalCache {
public static superUsers = new Array<Snowflake>();
public static disabledCommands = new Array<string>();
public static blacklistedChannels = new Array<Snowflake>();
public static blacklistedGuilds = new Array<Snowflake>();
public static blacklistedUsers = new Array<Snowflake>();
}
+
+export class BushCache {
+ public static global = GlobalCache;
+}
diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts
index 2225bde..6adacfd 100644
--- a/src/lib/utils/BushLogger.ts
+++ b/src/lib/utils/BushLogger.ts
@@ -105,7 +105,7 @@ export class BushLogger {
.setDescription(`**[${header}]** ${this.parseFormatting(this.stripColor(newContent), '', true)}`)
.setColor(this.client.util.colors.gray)
.setTimestamp();
- this.channelLog({ embeds: [embed] });
+ await this.channelLog({ embeds: [embed] });
}
/**
@@ -125,7 +125,7 @@ export class BushLogger {
.setDescription(`**[${header}]** ${this.parseFormatting(this.stripColor(newContent), '', true)}`)
.setColor(this.client.util.colors.info)
.setTimestamp();
- this.channelLog({ embeds: [embed] });
+ await this.channelLog({ embeds: [embed] });
}
/**
@@ -146,7 +146,7 @@ export class BushLogger {
.setDescription(`**[${header}]** ${this.parseFormatting(this.stripColor(newContent), '', true)}`)
.setColor(this.client.util.colors.warn)
.setTimestamp();
- this.channelLog({ embeds: [embed] });
+ await this.channelLog({ embeds: [embed] });
}
/**
@@ -166,7 +166,7 @@ export class BushLogger {
.setDescription(`**[${header}]** ${this.parseFormatting(this.stripColor(newContent), '', true)}`)
.setColor(this.client.util.colors.error)
.setTimestamp();
- this.channelError({ embeds: [embed] });
+ await this.channelError({ embeds: [embed] });
}
/**
diff --git a/src/lib/utils/CanvasProgressBar.ts b/src/lib/utils/CanvasProgressBar.ts
index aa8630a..d870bf9 100644
--- a/src/lib/utils/CanvasProgressBar.ts
+++ b/src/lib/utils/CanvasProgressBar.ts
@@ -1,10 +1,10 @@
// I just copy pasted this code from stackoverflow don't yell at me if there is issues for it
export class CanvasProgressBar {
- private x: number;
- private y: number;
- private w: number;
- private h: number;
- private color: string;
+ private readonly x: number;
+ private readonly y: number;
+ private readonly w: number;
+ private readonly h: number;
+ private readonly color: string;
private percentage: number;
private p: number;
private ctx: CanvasRenderingContext2D;