Skip to content

Commit

Permalink
add cfonts and make beautifull console log
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 18, 2021
1 parent 64e1b95 commit cb428ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions krypton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {
const { Collection } = require('discord.js')
const { readdirSync } = require('fs')
const { join } = require('path')
const { start, success, getGroupAdmins } = require('./utils/functions')
const { start, success, getGroupAdmins, banner } = require('./utils/functions')
const { color } = require('./utils/color')
const fs = require('fs')
const moment = require('moment-timezone')
Expand All @@ -17,7 +17,7 @@ async function krypton () {
client.runtimeDb = new Collection()
const cooldowns = new Collection()
client.logger.level = 'warn'
// console.log(banner.string)
console.log(banner.string)
await client.on('qr', () => {
console.log(color('[', 'white'), color('!', 'red'), color(']', 'white'), color(' Scan the QR code above'))
})
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"moment-timezone": "^0.5.32",
"axios": "^0.21.1",
"wa-canvas": "git+https://github.com/Kry9toN/wa-canvas.git",
"release-it": "^14.2.2"
"release-it": "^14.2.2",
"cfonts": "^2.9.1"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
Expand Down
11 changes: 10 additions & 1 deletion utils/functions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Spin = require('spinnies')
const moment = require('moment-timezone')
const axios = require('axios')
const cfonts = require('cfonts')

const spinner = {
interval: 120,
Expand Down Expand Up @@ -55,9 +56,17 @@ const getGroupAdmins = (participants) => {
return admins
}

const banner = cfonts.render(('KRYPTON|WHATSAPP|BOT'), {
font: 'block',
colors: ['red', 'blue'],
align: 'center',
lineHeight: 2
})

module.exports = {
start,
success,
processTime,
getGroupAdmins
getGroupAdmins,
banner
}

0 comments on commit cb428ce

Please sign in to comment.