aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils
diff options
context:
space:
mode:
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;