kitsu-org / cardboard

Your paper thin Misskey Wrapper!
MIT License
5 stars 1 forks source link
javascript misskey misskey-bot typescript

Cardboard 📦

Cardboard is a module that allows you to easily work with misskey, with a focus on Sharkey.

No dependencies, strictly typed, and looking quite stylish!

Example

import { CardboardClient } from '@kitsu-org/cardboard';
const cardboard = new CardboardClient("kitsunes.club", "yourkeyhere");

cardboard.on("ready", async () => {
    cardboard.log("Ready!")
});

cardboard.on("mention", async (msg) => {
    if (
        msg.note.text
            ?.replaceAll(`@${(await cardboard.getSelf()).user.username} `, "")
            .startsWith("hello")
    ) {
        await msg.reply("Cardboard! 📦");
    }
});

cardboard.connect();

installation

Installing cardboard is easy! You can install cardboard by including it into your project, like so!

# Install the stable version of cardboard
bun add @kitsu-org/cardboard

If you want to use the cutting edge version, you can install it through git.

⚠️ You should keep in mind that reliability will not be great if you use this method, but you'll get more features.

# Install the development edition
bun add github:kitsu-org/cardboard