Last active
April 6, 2023 08:30
-
-
Save vikiboss/97ecdde593232bd95e8e79cdea7ead08 to your computer and use it in GitHub Desktop.
KiviBot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sade from 'sade' | |
const kivi = sade('kivi') | |
kivi | |
.version('1.0.0') | |
.describe('cli for kivibot') | |
.option('-c, --config', 'Provide path to custom kivibot config', 'kivi.json') | |
kivi | |
.command('start') | |
.describe('start') | |
.example('start') | |
.action(opts => { | |
console.log('opts', opts) | |
}) | |
kivi.parse(process.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import degit from 'degit' | |
const repo = 'vikiboss/kivibot-plugin-template-ts' | |
const dg = degit(repo, { cache: true, force: true }) | |
await dg.clone('./plugin/ts-demo') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import figlet from 'figlet' | |
import gradient from 'gradient-string' | |
const LOGO = figlet.textSync('KiviBot', { font: 'Colossal' }).trim() | |
console.log(LOGO) | |
// output: | |
// 888 d8P d8b d8b 888888b. 888 | |
// 888 d8P Y8P Y8P 888 "88b 888 | |
// 888 d8P 888 .88P 888 | |
// 888d88K 888 888 888 888 8888888K. .d88b. 888888 | |
// 8888888b 888 888 888 888 888 "Y88b d88""88b 888 | |
// 888 Y88b 888 Y88 88P 888 888 888 888 888 888 | |
// 888 Y88b 888 Y8bd8P 888 888 d88P Y88..88P Y88b. | |
// 888 Y88b 888 Y88P 888 8888888P" "Y88P" "Y888 | |
console.log(gradient.rainbow.multiline(LOGO)) | |
const duck = gradient.rainbow.multiline([' __', '<(o )___', ' ( ._> /', " `---'"].join('\n')) | |
console.log(duck) | |
console.log(gradient('blue', 'purple')('KiviBot')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ora from 'ora' | |
const loading = ora({ | |
color: 'magenta', | |
spinner: { | |
interval: 50, | |
frames: ['◢', '◣', '◤', '◥'] | |
} | |
}) | |
loading.start("loading...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment