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

ghostselfbotx

v0.0.1

Published

A powerful, feature-rich selfbot library for Discord with advanced auto-response capabilities

Readme

🎭 GhostSelfBot X - Your Ultimate Discord Companion

Version License Node Discord

The most powerful, feature-rich selfbot library for Discord with advanced auto-response capabilities


🚀 Features

GhostSelfBot X offers an impressive array of features designed to enhance your Discord experience:

  • ✅ Advanced Auto-Response System

    • Reply automatically when you're away
    • Customize your away message
    • Set DM-only mode for privacy
    • Receive notifications when auto-replies are sent
  • ✅ Keyword-Based Auto-Responder

    • Set up automatic responses to specific keywords
    • Create custom responses for different triggers
    • Exclude specific channels or servers
  • ✅ Message Management

    • Powerful message handling with automatic caching
    • Enhanced message reply functionality
    • Support for rich embeds and formatting
  • ✅ Robust Infrastructure

    • WebSocket connection monitoring
    • Advanced error handling
    • Detailed debugging options
  • ✅ Security-Focused

    • Token security protection
    • No sensitive information in logs
    • Rate limit handling to avoid flags

⚠️ Disclaimer

IMPORTANT: Using selfbots is against Discord's Terms of Service and may result in account termination. Use at your own risk.

This software is provided for educational purposes only. The developers take no responsibility for any consequences resulting from the use of this software.

📦 Installation

Install GhostSelfBot X using npm:

npm install ghostselfbotx

🔧 Quick Setup

// Import the library
const { Client } = require('ghostselfbotx');

// Create a new client
const client = new Client({
  messageCacheMaxSize: 100 // Number of messages to cache
});

// Set up event listeners
client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

// Handle incoming messages
client.on('message', message => {
  // Don't respond to messages from other users if you only want to process your own commands
  if (message.author.id !== client.user.id) return;
  
  if (message.content === '!ping') {
    message.reply(`Pong! API Latency: ${client.ws.ping}ms`);
  }
});

// Login with your token (use environment variables in production)
client.login(process.env.DISCORD_TOKEN)
  .then(() => console.log('Login successful!'))
  .catch(err => console.error('Login failed:', err));

🤖 Auto-Response Systems

Away Mode

Set up an automatic response system for when you're away:

// Set up variables
let isAway = false;
let awayMessage = "I'm currently away and will respond when I return.";
const respondedUsers = new Map();

// Listen for commands to toggle away mode
client.on('message', message => {
  if (message.author.id !== client.user.id) return;

  if (message.content === '!away on') {
    isAway = true;
    message.reply('Away mode is now **enabled**.');
  } else if (message.content === '!away off') {
    isAway = false;
    message.reply('Away mode is now **disabled**.');
  } else if (message.content.startsWith('!away message ')) {
    awayMessage = message.content.slice('!away message '.length);
    message.reply(`Away message set to: ${awayMessage}`);
  }
});

// Auto-respond to messages
client.on('message', async message => {
  // Ignore own messages and check if away mode is enabled
  if (message.author.id === client.user.id || !isAway) return;

  // Check if it's a DM or a mention
  const isDM = message.channel.type === 'DM';
  const isMention = message.mentions.users.has(client.user.id);

  if (isDM || isMention) {
    try {
      const embed = {
        title: 'Automatic Response',
        description: awayMessage,
        color: 0x00AAFF,
        timestamp: new Date()
      };

      await message.channel.send({ content: '⚠️ Auto-Response', embeds: [embed] });
    } catch (error) {
      console.error('Error sending auto-response:', error);
    }
  }
});

Keyword Responder

Set up automatic responses to specific keywords:

// Configuration
let keywordResponderEnabled = true;
const keywordResponses = new Map();

// Add some default keywords
keywordResponses.set('help', 'Need assistance? Try using !commands.');
keywordResponses.set('hello', 'Hello there! How can I help you today?');

// Monitor messages for keywords
client.on('message', async message => {
  if (message.author.id === client.user.id || !keywordResponderEnabled) return;
  
  const content = message.content.toLowerCase();
  for (const [keyword, response] of keywordResponses.entries()) {
    if (content.includes(keyword)) {
      try {
        // Add a natural delay
        await new Promise(resolve => setTimeout(resolve, 1500));
        await message.channel.send(response);
        break; // Only respond once per message
      } catch (error) {
        console.error('Error sending keyword response:', error);
      }
    }
  }
});

🔍 Advanced Usage

Check out our detailed developer guide for more advanced usage examples including:

  • Custom embeds and rich content
  • Presence management
  • Command handling
  • Custom event management
  • Advanced security practices
  • Debugging and troubleshooting

🔒 Security Best Practices

  1. Never hard-code your token - Use environment variables:

    require('dotenv').config();
    client.login(process.env.DISCORD_TOKEN);
  2. Sanitize error outputs to avoid leaking your token:

    function sanitizeErrorMessage(error) {
      if (!error) return 'Unknown error';
         
      let errorMessage = error.toString();
      return errorMessage.replace(/([A-Za-z0-9_-]{24}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27})/g, '[HIDDEN_TOKEN]');
    }
  3. Respect rate limits to avoid detection and account flags

🆘 Need Help?

🤝 Contributing

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

📄 License

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


GhostNet Team © 2025-2026

Made with ❤️ for the Discord community