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

@alex110709/discord-user

v1.0.2

Published

Clawdbot Discord user account (selfbot) channel plugin

Readme

@alex110709/discord-user

Clawdbot plugin for Discord user account (selfbot) integration. This allows Clawdbot to act as a real Discord user, not a bot.

⚠️ Warning: Using selfbots violates Discord's Terms of Service. Your account may be banned. Use at your own risk. This plugin is intended for personal automation and testing purposes only.

Features

  • Login as a real Discord user account
  • Send and receive messages in DMs, channels, and threads
  • React to messages
  • Send media attachments
  • Typing indicators
  • Message history fetching

Installation

From npm (when published)

clawdbot plugins install @alex110709/discord-user

From local directory

# Build the plugin
cd discord-user-plugin
npm install
npm run build

# Install to Clawdbot
clawdbot plugins install -l ./discord-user-plugin

Configuration

Getting your Discord User Token

  1. Open Discord in your browser (not the desktop app)
  2. Press F12 to open Developer Tools
  3. Go to the Network tab
  4. Send a message in any channel
  5. Look for a request to messages and click it
  6. In the Headers tab, find the Authorization header - this is your token

Or use browser console:

// In Discord web app console
(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()

Config file

Add to your Clawdbot config (~/.clawdbot/config.json5):

{
  channels: {
    "discord-user": {
      enabled: true,
      token: "YOUR_DISCORD_USER_TOKEN",
      // Or use environment variable: DISCORD_USER_TOKEN
      
      // DM policy: "open" | "pairing" | "allowlist"
      dmPolicy: "pairing",
      
      // Allowed user IDs for DMs
      allowFrom: ["123456789012345678"],
      
      // Group/channel policy: "open" | "allowlist"
      groupPolicy: "allowlist",
      
      // Guild/channel allowlist
      guilds: {
        "GUILD_ID": {
          enabled: true,
          channels: {
            "CHANNEL_ID": true
          }
        }
      }
    }
  }
}

Environment variable

export DISCORD_USER_TOKEN="your_token_here"

Multi-account setup

{
  channels: {
    "discord-user": {
      enabled: true,
      accounts: {
        main: {
          token: "TOKEN_1",
          name: "Main Account"
        },
        alt: {
          token: "TOKEN_2",
          name: "Alt Account"
        }
      }
    }
  }
}

Usage

Once configured and the gateway is running, Clawdbot will:

  1. Log in as the Discord user
  2. Listen for messages in allowed channels/DMs
  3. Respond as configured by your Clawdbot setup

Sending messages

The plugin integrates with Clawdbot's messaging system. You can send messages using:

# CLI
clawdbot send --channel discord-user --to "channel:CHANNEL_ID" "Hello!"
clawdbot send --channel discord-user --to "user:USER_ID" "Hello!"

# Or via message tool in agent
message action=send channel=discord-user to="channel:123456789" message="Hello!"

Target formats

  • channel:CHANNEL_ID - Send to a text channel
  • user:USER_ID - Send to a user's DM
  • CHANNEL_ID - Raw channel ID (sends to channel)

Security Considerations

  1. Token Security: Your Discord token is equivalent to your password. Keep it secret.
  2. ToS Violation: Selfbots violate Discord ToS. Your account may be banned without warning.
  3. Rate Limits: Discord has strict rate limits. Excessive automation can trigger them.
  4. Account Safety: Use a secondary account if possible.

Differences from Bot Account

| Feature | Bot Account | User Account (Selfbot) | |---------|------------|----------------------| | ToS Compliant | ✅ Yes | ❌ No | | Nitro Features | ❌ No | ✅ Yes (if subscribed) | | Join Servers | Invite link | Normal join | | DM Anyone | ❌ Restricted | ✅ Yes | | Read Messages | Only with intent | ✅ All visible | | Slash Commands | ✅ Yes | ❌ No (can't create) | | Polls | ✅ Yes | ❌ No (can't create) |

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run watch

Troubleshooting

"Invalid token"

  • Make sure you're using a user token, not a bot token
  • User tokens don't start with "Bot " prefix
  • Token may have expired - get a new one

"Rate limited"

  • Reduce message frequency
  • Add delays between operations
  • Discord rate limits are stricter for user accounts

"Cannot access channel"

  • User must have permission to view the channel
  • Check if user is in the guild
  • Verify channel ID is correct

License

MIT