From e6f87a8bf587010d6a8de0845f263d541adbdc54 Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 15 Jan 2024 00:20:42 +0000 Subject: [PATCH] fix: log banner colours on Pterodactyl --- src/index.js | 2 +- src/lib/banner.js | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 128803fe2..e952b70c7 100644 --- a/src/index.js +++ b/src/index.js @@ -25,7 +25,7 @@ const pkg = require('../package.json'); const banner = require('./lib/banner'); -console.log(banner(pkg.version)); // print big title +banner(pkg.version); // print big title const semver = require('semver'); const { colours } = require('leeks.js'); diff --git a/src/lib/banner.js b/src/lib/banner.js index ae474ed29..321a0528d 100644 --- a/src/lib/banner.js +++ b/src/lib/banner.js @@ -1,9 +1,20 @@ +/* eslint-disable no-console */ const { colours } = require('leeks.js'); const figlet = require('figlet'); const link = require('terminal-link'); -module.exports = version => colours.cyan(figlet.textSync('Discord', { font: 'Banner3' })) + - colours.cyan('\n\n' + figlet.textSync('Tickets', { font: 'Banner3' })) + - colours.cyanBright(`\n\n${link('Discord Tickets', 'https://discordtickets.app')} bot v${version} by eartharoid`) + - colours.cyanBright('\nSponsor this project at https://discordtickets.app/sponsor') + - '\n\n'; +module.exports = version => { + figlet + .textSync('Discord', { font: 'Banner3' }) + .split('\n') + .forEach(line => console.log(colours.cyan(line))); + console.log(''); + figlet + .textSync('Tickets', { font: 'Banner3' }) + .split('\n') + .forEach(line => console.log(colours.cyan(line))); + console.log(''); + console.log(colours.cyanBright(`${link('Discord Tickets', 'https://discordtickets.app')} bot v${version} by eartharoid`)); + console.log(colours.cyanBright('Sponsor this project at https://discordtickets.app/sponsor')); + console.log('\n'); +};