klassic-js

A discord.js framework

Usage no npm install needed!

<script type="module">
  import klassicJs from 'https://cdn.skypack.dev/klassic-js';
</script>

README

Klassic JS

Klassic is an async-await based image(not only that) utility package.

What can it do?

  • Create your own images, for example, you can create a custom youtube comment image with <KlassicJS>.comment(avatar, username, comment)

  • Get a random emotion gif for example: hug, kiss, pat, wink

  • Ofcourse others, including, random facts, random answers for 8ball, and random quotes!

Content

image

// discord.js bot example
const {emotions} = require('klassic-js');

<Client>.on('message', async(msg) => {
    if(message.content.startsWith("!hug")) {
        const cat = await emotions.hug();
        return msg.channel.send(hug); // same for kiss, pat, wink
    }
})

Image Manipulation

// discord.js bot example
const {image} = require('klassic-js');

<Client>.on('message', async(msg) => {
    if(message.content.startsWith("!hug")) {
        const cat = await image.cat();
        return msg.channel.send(cat); // same for comment, crap, dog, meme, panda, recaptcha, triggered, trumpTweet
    }
})

Others

// discord.js bot example
const {others} = require('klassic-js');

<Client>.on('message', async(msg) => {
    const args = message.content.slice('!'.length).trim().split(' ');
    const command = args.shift().toLowerCase();

    if(command === '8ball') {
        const question = args.slice(0).join(' ');
        const answer = await others.eightBall() // same for fact, quote
    }
})