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/lib/utils/BushCache.ts | 6 +++++- src/lib/utils/BushLogger.ts | 8 ++++---- src/lib/utils/CanvasProgressBar.ts | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'src/lib/utils') 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(); public static disabledCommands = new Array(); public static blacklistedChannels = new Array(); public static blacklistedGuilds = new Array(); public static blacklistedUsers = new Array(); } + +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; -- cgit