UNPKG

simplify-cord

Version:

SimplifyCord is an unofficial extension of the 'discord.js' library. Our extension aims to simplify the development of Discord bots, promoting cleaner code and easier maintenance.

35 lines (34 loc) • 1.49 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Logger = void 0; const chalk_1 = __importDefault(require("chalk")); class Logger { static success(message, context) { console.log(chalk_1.default.green('✓'), context ? chalk_1.default.cyan(`[${context}]`) : '', message); } static error(message, error, context) { console.log(chalk_1.default.red.bold('✖'), context ? chalk_1.default.cyan(`[${context}]`) : '', chalk_1.default.red(message)); if (error) { console.log(chalk_1.default.red('Details:'), error); } } static warn(message, context) { console.log(chalk_1.default.yellow('⚠'), context ? chalk_1.default.cyan(`[${context}]`) : '', chalk_1.default.yellow(message)); } static info(message, context) { console.log(chalk_1.default.blue('ℹ'), context ? chalk_1.default.cyan(`[${context}]`) : '', message); } static ready(message, context) { console.log(chalk_1.default.green('➜'), context ? chalk_1.default.cyan(`[${context}]`) : '', chalk_1.default.green(message)); } static separator() { console.log(chalk_1.default.gray('─'.repeat(50))); } static highlight(text, color = '#7289DA') { return chalk_1.default.hex(color).bold(text); } } exports.Logger = Logger;