npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thataaaaaa/kraftjs

v1.0.1

Published

Modern Discord framework

Downloads

258

Readme

⚡ Arlecchino Bot Framework (KraftJS)

Framework base para criação de bots Discord com WebSocket, sistema de comandos, interações avançadas e gerenciamento completo de guilds.

Inspirado na arquitetura de bots modernos e otimizado para performance e escalabilidade.

🚀 Instalação

npm install @thataaaa/kraftjs

🤖 Bot oficial (Arlecchino)

🔗 Bot: https://discord.com/oauth2/authorize?client_id=1441027871069048902

🛠️ Suporte / Updates: https://discord.gg/WjeVXJPn5p

⚙️ Exemplo básico

const KraftClient = require('@thataaaa/kraftjs');

const client = new KraftClient({
    token: 'SEU_TOKEN',
    clientId: 'SEU_CLIENT_ID',
    intents: 0
});

client.on('ready', (data) => {
    console.log(`🤖 Online como ${data.user.username}`);
});

client.connect();

💬 Criando um comando

client.command({
    name: 'ping',

    async execute(interaction, client) {
        await client.api.request(
            `/interactions/${interaction.id}/${interaction.token}/callback`,
            {
                method: 'POST',
                body: {
                    type: 4,
                    data: {
                        content: '🏓 Pong!'
                    }
                }
            }
        );
    }
});

📦 Registrando comandos

await client.ConfigCommands(null, [
    {
        name: 'ping',
        description: 'Responde Pong!'
    }
]);

🎮 Status do bot

client.setStatus({
    name: 'Arlecchino Framework',
    type: 0,
    status: 'online'
});

📡 Eventos principais

client.on('connect', () => {});
client.on('ready', () => {});
client.on('interactionCreate', () => {});
client.on('commandExecute', () => {});
client.on('commandError', () => {});
client.on('gatewayError', () => {});

🧩 InteractionManager

🔘 Botão

const button = client.interactions.createButton({
    user: interaction.member.user.id,
    tempo: ms('10m'),
    funcao: async (i, client) => {
        console.log('clicado');
    },
    data: {
        label: 'Clique',
        style: 1
    }
});

📋 Select

const select = client.interactions.createSelect({
    user: interaction.member.user.id,
    tempo: ms('10m'),
    funcao: async (i, client) => {
        console.log('select');
    },
    data: {
        placeholder: 'Escolha',
        options: [{ label: 'Opção', value: '1' }]
    }
});

🪟 Modal

const modal = client.interactions.createModal({
    user: interaction.member.user.id,
    tempo: ms('10m'),
    title: 'Modal',
    components: [],
    funcao: async (i, client, fields) => {
        console.log(fields);
    }
});

⚙️ Resumo

  • IDs temporários

  • Expiração automática

  • Apenas usuário autorizado

  • Erros tratados automaticamente

⚠️ Aviso

Este framework está em desenvolvimento ativo e pode sofrer mudanças estruturais.

Use em produção com cautela.

👑 Projeto

Arlecchino Bot Framework Desenvolvido por @thataaaa

🤖 Bot oficial: https://discord.com/oauth2/authorize?client_id=1441027871069048902

🛠️ Suporte / Updates: https://discord.gg/WjeVXJPn5p