aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils/Console.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 20:17:31 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 20:17:31 -0400
commit6bb93ad27fbc39dc8cf6c8adb5e88e7c39e6c788 (patch)
tree84cf9b827f50803995af50394792f3ffc9f2f0cf /src/lib/utils/Console.ts
parent6d40a6aae3e861cc15684e9f406f678099da7333 (diff)
downloadtanzanite-6bb93ad27fbc39dc8cf6c8adb5e88e7c39e6c788.tar.gz
tanzanite-6bb93ad27fbc39dc8cf6c8adb5e88e7c39e6c788.tar.bz2
tanzanite-6bb93ad27fbc39dc8cf6c8adb5e88e7c39e6c788.zip
I am dumb
Diffstat (limited to 'src/lib/utils/Console.ts')
-rw-r--r--src/lib/utils/Console.ts166
1 files changed, 83 insertions, 83 deletions
diff --git a/src/lib/utils/Console.ts b/src/lib/utils/Console.ts
index 5b61094..b74ea07 100644
--- a/src/lib/utils/Console.ts
+++ b/src/lib/utils/Console.ts
@@ -1,93 +1,93 @@
-import chalk from 'chalk';
-import { BushClient } from '../extensions/BushClient';
+// import chalk from 'chalk';
+// import { BushClient } from '../extensions/BushClient';
-export class CustomConsole {
- private client: BushClient;
- public constructor(client: BushClient) {
- this.client = client;
- }
+// export class CustomConsole {
+// private client: BushClient;
+// public constructor(client: BushClient) {
+// this.client = client;
+// }
- private parseColors(content: any, color: 'blueBright' | 'blackBright' | 'redBright' | 'yellowBright' | 'greenBright'): string | any {
- if (typeof content === 'string') {
- const newContent: Array<string> = content.split(/<<|>>/);
- const tempParsedArray: Array<string> = [];
- newContent.forEach((value, index) => {
- if (index % 2 !== 0) {
- tempParsedArray.push(chalk[color](value));
- } else {
- tempParsedArray.push(value);
- }
- });
- return tempParsedArray.join('');
- } else {
- return content;
- }
- }
+// private parseColors(content: any, color: 'blueBright' | 'blackBright' | 'redBright' | 'yellowBright' | 'greenBright'): string | any {
+// if (typeof content === 'string') {
+// const newContent: Array<string> = content.split(/<<|>>/);
+// const tempParsedArray: Array<string> = [];
+// newContent.forEach((value, index) => {
+// if (index % 2 !== 0) {
+// tempParsedArray.push(chalk[color](value));
+// } else {
+// tempParsedArray.push(value);
+// }
+// });
+// return tempParsedArray.join('');
+// } else {
+// return content;
+// }
+// }
- private timeStamp(): string {
- const now = new Date();
- const hours = now.getHours();
- const minute = now.getMinutes();
- let hour = hours;
- let amOrPm: 'AM' | 'PM' = 'AM';
- if (hour > 12) {
- amOrPm = 'PM';
- hour = hour - 12;
- }
+// private timeStamp(): string {
+// const now = new Date();
+// const hours = now.getHours();
+// const minute = now.getMinutes();
+// let hour = hours;
+// let amOrPm: 'AM' | 'PM' = 'AM';
+// if (hour > 12) {
+// amOrPm = 'PM';
+// hour = hour - 12;
+// }
- return `${hour >= 10 ? hour : `0${hour}`}:${minute >= 10 ? minute : `0${minute}`} ${amOrPm}`;
- }
+// return `${hour >= 10 ? hour : `0${hour}`}:${minute >= 10 ? minute : `0${minute}`} ${amOrPm}`;
+// }
- /**
- * Logs debug information.
- * @param content - The content to log.
- */
- public debug(content: any): void {
- console.log(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey('[Debug]')}`, content);
- }
+// /**
+// * Logs debug information.
+// * @param content - The content to log.
+// */
+// public debug(content: any): void {
+// console.log(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey('[Debug]')}`, content);
+// }
- /**
- * Logs verbose information. Highlight information by surrounding it in `<<>>`.
- * @param header - The header displayed before the content, displayed in grey.
- * @param content - The content to log, highlights displayed in bright black.
- */
- public verbose(header: string, content: string): void {
- return console.info(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey(`[${header}]`)} ` + this.parseColors(content, 'blackBright'));
- }
+// /**
+// * Logs verbose information. Highlight information by surrounding it in `<<>>`.
+// * @param header - The header displayed before the content, displayed in grey.
+// * @param content - The content to log, highlights displayed in bright black.
+// */
+// public verbose(header: string, content: string): void {
+// return console.info(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey(`[${header}]`)} ` + this.parseColors(content, 'blackBright'));
+// }
- /**
- * Logs information. Highlight information by surrounding it in `<<>>`.
- * @param header - The header displayed before the content, displayed in cyan.
- * @param content - The content to log, highlights displayed in bright blue.
- */
- public info(header: string, content: string): void {
- return console.info(`${chalk.bgCyan(this.timeStamp())} ${chalk.cyan(`[${header}]`)} ` + this.parseColors(content, 'blueBright'));
- }
+// /**
+// * Logs information. Highlight information by surrounding it in `<<>>`.
+// * @param header - The header displayed before the content, displayed in cyan.
+// * @param content - The content to log, highlights displayed in bright blue.
+// */
+// public info(header: string, content: string): void {
+// return console.info(`${chalk.bgCyan(this.timeStamp())} ${chalk.cyan(`[${header}]`)} ` + this.parseColors(content, 'blueBright'));
+// }
- /**
- * Logs warnings. Highlight information by surrounding it in `<<>>`.
- * @param header - The header displayed before the content, displayed in yellow.
- * @param content - The content to log, highlights displayed in bright yellow.
- */
- public warn(header: string, content: string): void {
- return console.warn(`${chalk.bgYellow(this.timeStamp())} ${chalk.yellow(`[${header}]`)} ` + this.parseColors(content, 'yellowBright'));
- }
+// /**
+// * Logs warnings. Highlight information by surrounding it in `<<>>`.
+// * @param header - The header displayed before the content, displayed in yellow.
+// * @param content - The content to log, highlights displayed in bright yellow.
+// */
+// public warn(header: string, content: string): void {
+// return console.warn(`${chalk.bgYellow(this.timeStamp())} ${chalk.yellow(`[${header}]`)} ` + this.parseColors(content, 'yellowBright'));
+// }
- /**
- * Logs errors. Highlight information by surrounding it in `<<>>`.
- * @param header - The header displayed before the content, displayed in bright red.
- * @param content - The content to log, highlights displayed in bright red.
- */
- public error(header: string, content: string): void {
- return console.error(`${chalk.bgRedBright(this.timeStamp())} ${chalk.redBright(`[${header}]`)} ` + this.parseColors(content, 'redBright'));
- }
+// /**
+// * Logs errors. Highlight information by surrounding it in `<<>>`.
+// * @param header - The header displayed before the content, displayed in bright red.
+// * @param content - The content to log, highlights displayed in bright red.
+// */
+// public error(header: string, content: string): void {
+// return console.error(`${chalk.bgRedBright(this.timeStamp())} ${chalk.redBright(`[${header}]`)} ` + this.parseColors(content, 'redBright'));
+// }
- /**
- * Logs successes. Highlight information by surrounding it in `<<>>`.
- * @param header - The header displayed before the content, displayed in green.
- * @param content - The content to log, highlights displayed in bright green.
- */
- public success(header: string, content: string): void {
- return console.log(`${chalk.bgGreen(this.timeStamp())} ${chalk.greenBright(`[${header}]`)} ` + this.parseColors(content, 'greenBright'));
- }
-}
+// /**
+// * Logs successes. Highlight information by surrounding it in `<<>>`.
+// * @param header - The header displayed before the content, displayed in green.
+// * @param content - The content to log, highlights displayed in bright green.
+// */
+// public success(header: string, content: string): void {
+// return console.log(`${chalk.bgGreen(this.timeStamp())} ${chalk.greenBright(`[${header}]`)} ` + this.parseColors(content, 'greenBright'));
+// }
+// }