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

@boubouw/discord-selfbot-v14

v1.0.0

Published

An unofficial discord.js fork for creating selfbots with v14 support - WebSocket + Polling system for real-time message handling with user accounts

Readme

@boubouw/discord-selfbot-v14

discord.js-selfbot-v14 License Node

An unofficial discord.js fork for creating selfbots with v14 support

FeaturesInstallationQuick StartDocumentationContributing

⚠️ Disclaimer

This package is for educational purposes only. Using user tokens (selfbots) is against Discord's Terms of Service and may result in account bans. Use at your own risk.

Features

  • 🚀 Full discord.js v14 API compatibility for user accounts
  • 🔄 Hybrid WebSocket + Polling system for real-time message handling
  • 📡 Intelligent polling that automatically receives and responds to messages
  • 🎯 Built-in deduplication to prevent duplicate message processing
  • 🔐 User account authentication via token
  • 🛠️ Complete manager system (Guilds, Users, Relationships, etc.)
  • 📝 TypeScript support with included type definitions
  • High performance with minimal rate limit issues

Installation

Via npm

npm install @boubouw/discord-selfbot-v14

Via yarn

yarn add @boubouw/discord-selfbot-v14

Via GitHub

git clone https://github.com/boubouw/discord.js-selfbot-v14.git
cd discord.js-selfbot-v14
npm install

Quick Start

Basic Example

const { Client } = require('@boubouw/discord-selfbot-v14');

// Create client instance
const client = new Client({
  intents: ['Guilds'],
});

// Listen for ready event
client.once('ready', () => {
  console.log(`Connected as ${client.user.tag}`);
});

// Listen for messages
client.on('messageCreate', async (message) => {
  // Ignore own messages
  if (message.author.id === client.user.id) return;

  console.log(`${message.author.username}: ${message.content}`);

  // Respond to commands
  if (message.content === '!ping') {
    await message.channel.send('Pong!');
  }
});

// Login with user token
client.login('YOUR_USER_TOKEN');

Advanced Example with Commands

const { Client } = require('@boubouw/discord-selfbot-v14');

const client = new Client({
  intents: ['Guilds', 'GuildMessages'],
});

// Command system
client.commands = new Map();

client.commands.set('ping', {
  description: 'Test latency',
  async execute(message, args) {
    const sent = await message.channel.send('Pinging...');
    await sent.edit(`Pong! (${sent.createdTimestamp - message.createdTimestamp}ms)`);
  },
});

client.on('messageCreate', async (message) => {
  if (message.author.id === client.user.id) return;

  if (message.content.startsWith('!')) {
    const [commandName, ...args] = message.content.slice(1).split(/\s+/);
    const command = client.commands.get(commandName);

    if (command) {
      await command.execute(message, args);
    }
  }
});

client.login('YOUR_USER_TOKEN');

Documentation

Main Differences from discord.js

  1. User Account Authentication

    • Uses user tokens instead of bot tokens
    • No need for bot prefix in token
    • Automatic WebSocket + Polling system setup
  2. Message Reception

    • Hybrid WebSocket + Polling system for real-time messages
    • Automatic deduplication of messages
    • Intelligent channel caching
  3. Rate Limit Handling

    • Built-in rate limit awareness
    • Automatic retry mechanisms
    • Smart polling intervals

API Reference

The API follows discord.js v14 conventions with these main exports:

const {
  Client,           // Main client class
  Collection,       // Data collection
  GatewayIntentBits, // WebSocket intents
  REST,             // REST client
  Events,           // Discord events
} = require('@boubouw/discord-selfbot-v14');

Key Classes

Client

Main class for connecting to Discord with user accounts.

const client = new Client({
  intents: ['Guilds'], // Optional intents
  rest: {
    api: 'https://discord.com/api',
    version: '10',
    timeout: 30000,
  },
});

await client.login('USER_TOKEN');

Managers

  • GuildManager - Manage guilds
  • UserManager - Manage users
  • RelationshipManager - Manage friends/blocked users
  • ChannelManager - Manage channels

Architecture

Hybrid WebSocket + Polling System

This package uses a unique hybrid approach:

  1. WebSocket Connection - Initial connection and sync
  2. Intelligent Polling - Real-time message reception
  3. Smart Deduplication - Prevents duplicate processing
  4. Automatic Channel Loading - Discovers and caches channels

This approach ensures:

  • ✅ Real-time message handling
  • ✅ Minimal rate limit issues
  • ✅ Reliable message delivery
  • ✅ Efficient resource usage

Examples

Command Handler

const fs = require('fs');
const { Client } = require('@boubouw/discord-selfbot-v14');

const client = new Client();
client.commands = new Map();

// Load commands
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
  const command = require(`./commands/${file}`);
  client.commands.set(command.name, command);
}

client.on('messageCreate', async (message) => {
  if (!message.content.startsWith('!') || message.author.id === client.user.id) return;

  const args = message.content.slice(1).trim().split(/ +/);
  const commandName = args.shift().toLowerCase();
  const command = client.commands.get(commandName);

  if (command) {
    try {
      await command.execute(message, args);
    } catch (error) {
      console.error(error);
      await message.channel.send('Error executing command!');
    }
  }
});

client.login('YOUR_USER_TOKEN');

Event Handler

const fs = require('fs');
const { Client } = require('@boubouw/discord-selfbot-v14');

const client = new Client();

const eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js'));

for (const file of eventFiles) {
  const event = require(`./events/${file}`);
  if (event.once) {
    client.once(event.name, (...args) => event.execute(...args));
  } else {
    client.on(event.name, (...args) => event.execute(...args));
  }
}

client.login('YOUR_USER_TOKEN');

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development

# Clone the repository
git clone https://github.com/boubouw/discord.js-selfbot-v14.git

# Install dependencies
npm install

# Run linting
npm run lint

# Run tests
npm test

# Start development mode
npm start

Requirements

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Acknowledgments

Support

  • 📧 Issues - Bug reports and feature requests
  • 📚 Documentation - Full documentation
  • 💬 Discord - Community support (coming soon)

Warning

⚠️ Using user tokens (selfbots) is against Discord's Terms of Service.

This package is provided for educational purposes only. The authors are not responsible for any account bans or legal consequences resulting from the use of this software.

Always use official Discord bots for legitimate applications. This package should only be used for:

  • Educational purposes
  • Personal automation tasks
  • Understanding Discord's API
  • Testing and development

Made with ❤️ by the community

⬆ Back to top