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

@volter/twin-discord

v0.1.2

Published

Local Discord twin — a faithful, stateful local Discord bot API (REST v10 + the gateway websocket) your real discord.py / discord.js bot talks to unmodified. Channels, messages, slash commands, and a gateway handshake that makes a bot consider itself conn

Readme

@volter/twin-discord

A local Discord twin: the bot API your real discord.py or discord.js bot talks to unmodified. Both halves a bot needs — the REST v10 API and the gateway websocket — on one port.

bun packages/twin/discord/src/cli.ts serve --port 8080

Point the bot at it and it connects: GET /gateway/bot answers with this server's own websocket URL, so the bot discovers the gateway the same way it discovers Discord's.

What it does

  • The gateway handshake. HELLO → IDENTIFY → READY, with heartbeats acknowledged. A bot library does not consider itself logged in until this completes, so a REST-only twin would leave it retrying forever.
  • Messages. Post to a channel, read a channel newest-first with limit, edit, delete. A channel a world never seeded is created on first post: the twin admits the id its consumer believes in.
  • Events. A message posted through the REST door is dispatched to every connected bot as MESSAGE_CREATE — so a world puts words in a human's mouth by posting as them (Authorization: User <name>, a header no SDK sends; anything else is the bot), and the bot hears it over the wire.
  • Slash commands. Bulk overwrite (PUT .../commands) is the set the bot declared; a shrinking set shrinks.
  • The bot user. Created on first sight and stable thereafter, so nothing needs seeding to connect.

Coverage

Faithful: the v10 paths above, snowflake ids (decimal strings encoding the world clock), the {message, code} error shape and the codes a consumer branches on (10003 unknown channel, 10008 unknown message, 50006 empty message, 50035 bad limit).

Not modeled: auth (any bot token is accepted, and a bad token does not 401), rate limits, voice, threads, reactions, interactions beyond command registration, and sharding beyond a single shard.

Reaching it from an app you cannot modify

discord.py hardcodes https://discord.com/api/v10 and builds its own aiohttp session, so it ignores HTTPS_PROXY. Env-based attachment cannot redirect it. Use the world's reflect front (DNS plus the session CA — see docs/ATTACH.md), which is the mechanism for exactly this case: a binary whose HTTP client you do not control.