Skip to content

Commit

Permalink
make nice to look
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 23, 2021
1 parent 46312be commit bf280dc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/krypton.ts
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, banner } = require('./utils/functions')
const { start, success, getGroupAdmins } = require('./utils/functions')
const { color } = require('./utils/color')
const fs = require('fs')
const moment = require('moment-timezone')
Expand Down Expand Up @@ -48,7 +48,6 @@ async function krypton () {
client.runtimeDb = new Collection()
const cooldowns = new Collection()
client.logger.level = 'warn'
console.log(banner.string)
await client.on('qr', () => {
console.log(color('[', 'white'), color('!', 'red'), color(']', 'white'), color(' Scan the QR code above'))
})
Expand Down
8 changes: 0 additions & 8 deletions src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ const getGroupAdmins = (participants) => {
return admins
}

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

const getBuffer = async (url, options) => {
try {
options || {}
Expand Down Expand Up @@ -92,7 +85,6 @@ module.exports = {
success,
processTime,
getGroupAdmins,
banner,
getBuffer,
getRandom
}
18 changes: 16 additions & 2 deletions start.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
const { execSync } = require('child_process')
const cfonts = require('cfonts')
const chalk = require('chalk')

const color = (text, color) => {
return !color ? chalk.green(text) : chalk.keyword(color)(text)
}

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

start()

function start () {
console.info('[INFO] Compiling source...')
console.info(banner.string)
console.info(color('[INFO] Compiling source...', 'yellow'))
execSync('npm run compile')
console.info('[INFO] Done compiling, starting the bot...')
console.info(color('[INFO] Done compiling, starting the bot...', 'green'))
require('./dist/krypton.js')
}

0 comments on commit bf280dc

Please sign in to comment.