Archived
0
0
Fork 0

feat: Added figlet error logging

This commit is contained in:
Daryl Ronningen 2021-06-17 01:06:30 -07:00
parent d1cf8a73dd
commit 20e732a268
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
2 changed files with 6 additions and 4 deletions

View file

@ -22,10 +22,12 @@ import figlet from 'figlet';
import gradient from 'gradient-string';
import { token } from '../config.json';
import { info } from './utils/logger';
import { debug, error, info } from './utils/logger';
debug('Starting bot... Please wait');
figlet('Argon Bot', (err, data) => {
if (err) return;
if (err) error(`Figlet encountered an error!\n${err.message}`);
info(gradient.rainbow.multiline(`\n${data}`));
});
@ -35,7 +37,7 @@ const client = new Client({
});
client.on('ready', () => {
info('Startup!');
info('bot is ready!');
});
client.login(token);

View file

@ -68,7 +68,7 @@ export function info(message: string): void {
export function warn(message: string): void {
if(warnLevel)
console.log(logger`{grey (${date})} {yellow.bold.underline [WARN]}: ${message}`);
console.log(logger`{grey (${date})} {yellow.bold [WARN]}: ${message}`);
}
export function error(message: string): void {