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

dcsv.js

v1.1.1

Published

Ultra High Performance, Stackless Discord Library + Container UI System

Readme

dcsv.js

Ultra High Performance, Stackless Discord Library

npm version Downloads

dcsv.js is a lightweight, raw-performance focused Discord library designed for massive scale. Unlike other libraries that cache everything (Users, Guilds, Channels) and consume Gigabytes of RAM, dcsv.js is Stackless. It caches nothing by default, giving you 95% memory savings compared to traditional libraries.

🚀 Features

  • Stackless Architecture: Zero caching. 100% control.
  • Auto-Sharding: Built-in, zero-config sharding. Just set shards: 'auto'.
  • Container UI: 💎 Exclusive: Built-in helper for beautiful, professional "Container" style layouts (Ansi-enhanced).
  • Memory Efficient: Runs 20,000+ server bots on <500MB RAM.
  • Raw Events: Listen to any Discord event directly.
  • Interaction Focused: Optimized for Slash Commands and Buttons.
  • Connection Pooling: Advanced HTTP keep-alive for lower latency.

📦 Installation

npm install dcsv.js ws

⚡ Quick Start

const { Client, GatewayIntentBits } = require('dcsv.js');

const client = new Client({
    intents: GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages,
    shards: 'auto' // Automatically spawns required shards
});

client.on('ready', (user) => {
    console.log(`Logged in as ${user.username}!`);
    console.log(`Ready to serve on ${client.shards.size} shards.`);
    
    // Set Status
    client.setPresence({ name: 'dcsv.js Power', type: 0 });
});

client.on('interactionCreate', async (interaction) => {
    if (!interaction.isCommand()) return;

    if (interaction.data.name === 'ping') {
        await interaction.reply({ content: 'Pong! 🏓 (Stackless Speed)' });
    }
});

// Access Raw Events directly
client.on('GUILD_MEMBER_ADD', (data) => {
    console.log(`User ${data.user.username} joined guild ${data.guild_id}`);
});

client.login('YOUR_BOT_TOKEN');

🧠 Philosophy: What is "Stackless"?

Traditional libraries maintain a massive Map of every user, channel, and role your bot sees.

  • Bot joins 1,000 servers: Cache size ~200MB.
  • Bot joins 20,000 servers: Cache size ~8GB (Crash!).

dcsv.js does not cache.

  • When you need a user? You fetch it.
  • When you need a channel? You fetch it.
  • Most of the time? You just reply to the Event/Interaction, which carries all the data you need!

📚 Documentation

Client Options

new Client({
    intents: number, // Required
    shards: 'auto' | number, // Default: 1
    debug: boolean // Default: false
})

Methods

  • client.login(token)
  • client.request(method, endpoint, body) - Raw API request
  • client.createMessage(channelId, content) - Helper
  • client.getGuild(guildId) - Helper

Events

dcsv.js emits standard Discord event names as per Discord API Docs.

  • ready
  • interactionCreate
  • messageCreate
  • GUILD_CREATE
  • VOICE_STATE_UPDATE
  • ...and all others!

🍳 Cookbook / Recipes

Since dcsv.js is stackless, you rely on the Discord API for data. Here are common patterns:

1. Fetching User Banner

We don't cache users. To get a banner, fetch the user profile dynamically.

// GET /users/{id}
const user = await client.request('GET', `/users/${userId}`);

if (user.banner) {
    const ext = user.banner.startsWith('a_') ? 'gif' : 'png';
    const url = `https://cdn.discordapp.com/banners/${user.id}/${user.banner}.${ext}?size=1024`;
    console.log(url);
}

2. Fetching Server Details

Need member counts? Ask the API.

// GET /guilds/{id}?with_counts=true
const guild = await client.request('GET', `/guilds/${guildId}?with_counts=true`);

console.log(`Server: ${guild.name}`);
console.log(`Members: ${guild.approximate_member_count}`);
console.log(`Online: ${guild.approximate_presence_count}`);

3. Sending an Embed

We support standard Discord Embed objects.

await client.createMessage(channelId, {
    content: "Here is your info:",
    embeds: [{
        title: "Hello World",
        color: 0x00FF00, // Hex Color
        description: "This is a stackless embed.",
        fields: [
            { name: "Field 1", value: "Value 1", inline: true }
        ]
    }]
});

4. Handling Buttons (Interactions)

client.on('interactionCreate', async (interaction) => {
    if (interaction.isButton()) {
        if (interaction.customId === 'click_me') {
            await interaction.reply({ 
                content: "You clicked the button!", 
                flags: 64 // Ephemeral (Hidden)
            });
        }
    }
});

5. ✨ Exclusive: Create Container Message

Build professional, modern UIs instantly.

await client.createContainer(channelId, {
    title: "SERVER STATUS",
    color: 0x5865F2, // Blurple
    sections: [
        { title: "Performance", content: " [32mStable [0m" },
        { title: "Uptime", content: " [34m99.9% [0m", inline: true }
    ],
    footer: "Powered by dcsv.js"
});

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📄 License

MIT


🔗 Official Links

| Resource | Link | |----------|------| | Website | dcsv.me | | GitHub | DiscordSunucu/dcsv.js | | NPM | npmjs.com/package/dcsv.js |

📚 Documentation (Backlinks)

Since dcsv.js is designed for high-scale, reading the docs is recommended.

Turkish (TR) 🇹🇷

English (EN) 🇺🇸