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

icu-discord-db

v1.0.7

Published

Allows data storage on discord for free with multiple nodes and with AES-256-CBC encryption support

Readme

💾 IcuDB — Free Data Storage in Discord Channels

🌐 More of my projects: https://messi.icu

🐛 Easier way to contact me/suggest features or bugs: Discord Server


💡 Why I Made This

I wanted an easy, reliable, and encrypted way to store data inside Discord — no databases, no servers, just pure Discord.

Couldn’t find anything that fit my needs, so I made IcuDB.


📖 About

IcuDB lets you store data inside a Discord channel using messages as data nodes. When a message reaches the data size limit (≈25MB), a new node is automatically created — giving you a distributed yet unified datastore inside your server.

You can get, set, delete, and push data just like a regular database. Optionally, you can enable AES-256-CBC encryption for secure, symmetric encryption that’s also super fast.


⚙️ Features

  • 🧠 Multiple-node storage (splits data across messages)
  • 🔒 AES-256-CBC encryption support
  • ⚡ Fast and efficient
  • 📦 Built-in methods:
    • get – Retrieve data
    • set – Store data
    • delete / del – Remove data
    • push – Append to arrays
  • 🪶 Auto-save support
  • 🪄 Fully runs inside Discord — no external DB needed

🚀 Installation

npm install icu-discord-db

🧰 Example Usage

Basic Setup

const IcuDB = require("icu-discord-db");

(async () => {
  const db = await IcuDB.initialize({
    client: "<your_bot_token>", // Can also be an existing Discord.Client
    guildid: "<guild_id>",
    channelid: "<channel_id>",
    debug: true, // Optional
  });

  // Store data
  await db.set("users.messi", { name: "King Messi", goals: 802 });

  // Retrieve data
  console.log(await db.get("users.messi"));
  // -> { name: "King Messi", goals: 802 }

  // Delete data
  await db.delete("users.messi");

  // Push to array
  await db.set("scores", []);
  await db.push("scores", 10);
  await db.push("scores", 15);
  console.log(await db.get("scores"));
  // -> [10, 15]
})();

With Encryption Enabled

const IcuDB = require("icu-discord-db");

// Generate encryption keys
const encryption = JSON.parse(IcuDB.generateEncryptionConfig("mysecretpass"));

(async () => {
  const db = await IcuDB.initialize({
    client: "<your_bot_token>",
    guildid: "<guild_id>",
    channelid: "<channel_id>",
    debug: true, // Recommended when setting up project
    encryption: encryption, // Add the generated config here
  });

  await db.set("private.tokens", ["abc123", "xyz789"]);
  console.log(await db.get("private.tokens"));
  // -> ["abc123", "xyz789"]
})();

🔐 Encryption Details

IcuDB uses AES-256-CBC (Advanced Encryption Standard - Cipher Block Chaining). This means:

  • Symmetric key encryption (same key for encrypt/decrypt)
  • Strong and efficient for small to medium data payloads
  • Can be generated dynamically with:
const IcuDB = require("icu-discord-db");
console.log(IcuDB.generateEncryptionConfig("yourpassphrase"));
// Copy the generated config and use in your project when initializing the database
/*
Example:
await IcuDB.initialize(
    client: "<your_bot_token>",
    guildid: "<guild_id>",
    channelid: "<channel_id>",
    debug: true,
    encryption: {
      "key": "6b4e6b4b2b673f7e6e5d486b2b457b73",
      "iv": "2f5b482f4c345f435b2b484b5b456d3e"
    }
)
*/

Example output:

{
  "key": "6b4e6b4b2b673f7e6e5d486b2b457b73",
  "iv": "2f5b482f4c345f435b2b484b5b456d3e"
}

🧩 API Reference

initialize(options)

Creates or connects to a Discord-based database.

Options:

| Option | Type | Required | Description | |--------|------|-----------|-------------| | client | discord.Client or string | ✅ | Discord client or token | | guildid | string | ✅ | Guild ID | | channelid | string | ✅ | Channel ID where data is stored | | debug | boolean | ❌ | Logs debugging info, good when the app runs into issues and recommended to enable when setting up project | | encryption | { key, iv } | ❌ | Enable AES-256-CBC encryption | | autosave | boolean | ❌ | Enable auto-saving, defaults to true (each 3 seconds) | | saveinterval | number | ❌ | Interval in seconds for auto-save (defaults to the value of 3) |

Returns: A data handler with .get(), .set(), .delete(), and .push() methods.


generateEncryptionConfig(passphrase?)

Generates an AES key and IV for encryption.

Parameters:

  • passphrase (optional) — A string seed for key generation.

Returns: A JSON-formatted encryption configuration.


📜 License

MIT © Messi