{"_id":"@boubouw/discord-selfbot-v14","name":"@boubouw/discord-selfbot-v14","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@boubouw/discord-selfbot-v14","version":"1.0.0","description":"An unofficial discord.js fork for creating selfbots with v14 support - WebSocket + Polling system for real-time message handling with user accounts","main":"./src/index.js","types":"./typings/index.d.ts","scripts":{"start":"node start.js","test":"npm run lint:all && npm run test:typescript","test:typescript":"tsc --noEmit","lint":"eslint .","lint:fix":"eslint . --fix","format":"prettier --write src/**/*.js typings/**/*.ts","lint:all":"npm run lint && npm run format"},"directories":{"lib":"src","docs":"docs"},"repository":{"type":"git","url":"git+https://github.com/boubouw/discord.js-selfbot-v14.git"},"keywords":["discord.js","discord.js v14","selfbot","selfbot v14","djs","api","bot","node","discord","client","discordapp","user","account","user-bot","websocket","polling","real-time"],"author":{"name":"boubouw"},"license":"GPL-3.0","bugs":{"url":"https://github.com/boubouw/discord.js-selfbot-v14/issues"},"homepage":"https://github.com/boubouw/discord.js-selfbot-v14#readme","dependencies":{"@discordjs/builders":"^1.14.1","@discordjs/collection":"^2.1.1","@discordjs/rest":"^2.6.1","@discordjs/util":"^1.2.0","@discordjs/ws":"^2.0.4","@sapphire/snowflake":"^3.5.5","@vladfrangu/async_event_emitter":"^2.4.7","discord-api-types":"^0.38.43","dotenv":"^17.4.1","fetch-cookie":"^3.1.0","lodash.clonedeep":"^4.5.0","lodash.isempty":"^4.4.0","lodash.isequal":"^4.5.0","lodash.merge":"^4.6.2","lodash.pick":"^4.4.0","lodash.snakecase":"^4.1.1","lodash.uniqwith":"^4.5.0","otplib":"^12.0.1","qrcode":"^1.5.4","tough-cookie":"^5.1.2","ws":"^8.18.0"},"devDependencies":{"@types/node":"^22.19.15","@types/ws":"^8.5.10","eslint":"^9.39.4","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","prettier":"^3.8.1","typescript":"~5.9.3"},"engines":{"node":">=18.0.0"},"_id":"@boubouw/discord-selfbot-v14@1.0.0","_nodeVersion":"22.14.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-rIizmfViscBE23DrEm21W+CkDLcd0TLhq9vXFqN3AvYAotUiImKN7QhylxlP7/+VVHI9Rivtg7Y7/IszknhAzw==","shasum":"1ebf76e82c377642c307fe21e481126a2175a49d","tarball":"https://registry.npmjs.org/@boubouw/discord-selfbot-v14/-/discord-selfbot-v14-1.0.0.tgz","fileCount":343,"unpackedSize":1265814,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFe32+5MuCJjslOxvfhYFYIQa8ClD1Afn0AXsm94SBA3AiEAxShCqWEYCp7vQ+r8fI0fSXbw19MwInf9GYTVRix9Bxg="}]},"_npmUser":{"name":"boubouw","email":"samy74.hamdi@outlook.fr"},"maintainers":[{"name":"boubouw","email":"samy74.hamdi@outlook.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/discord-selfbot-v14_1.0.0_1775564992219_0.7637652699121507"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T12:29:52.120Z","1.0.0":"2026-04-07T12:29:52.516Z","modified":"2026-04-07T12:29:52.743Z"},"maintainers":[{"name":"boubouw","email":"samy74.hamdi@outlook.fr"}],"description":"An unofficial discord.js fork for creating selfbots with v14 support - WebSocket + Polling system for real-time message handling with user accounts","homepage":"https://github.com/boubouw/discord.js-selfbot-v14#readme","keywords":["discord.js","discord.js v14","selfbot","selfbot v14","djs","api","bot","node","discord","client","discordapp","user","account","user-bot","websocket","polling","real-time"],"repository":{"type":"git","url":"git+https://github.com/boubouw/discord.js-selfbot-v14.git"},"author":{"name":"boubouw"},"bugs":{"url":"https://github.com/boubouw/discord.js-selfbot-v14/issues"},"license":"GPL-3.0","readme":"# @boubouw/discord-selfbot-v14\n\n<div align=\"center\">\n\n  ![discord.js-selfbot-v14](https://img.shields.io/badge/discord.js--selfbot-v14-1.0.0-blue.svg)\n  ![License](https://img.shields.io/badge/license-GPL--3.0-green.svg)\n  ![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)\n\n  **An unofficial discord.js fork for creating selfbots with v14 support**\n\n  [Features](#features) • [Installation](#installation) • [Quick Start](#quick-start) • [Documentation](#documentation) • [Contributing](#contributing)\n\n</div>\n\n## ⚠️ Disclaimer\n\n**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.\n\n## Features\n\n- 🚀 **Full discord.js v14 API** compatibility for user accounts\n- 🔄 **Hybrid WebSocket + Polling system** for real-time message handling\n- 📡 **Intelligent polling** that automatically receives and responds to messages\n- 🎯 **Built-in deduplication** to prevent duplicate message processing\n- 🔐 **User account authentication** via token\n- 🛠️ **Complete manager system** (Guilds, Users, Relationships, etc.)\n- 📝 **TypeScript support** with included type definitions\n- ⚡ **High performance** with minimal rate limit issues\n\n## Installation\n\n### Via npm\n\n```bash\nnpm install @boubouw/discord-selfbot-v14\n```\n\n### Via yarn\n\n```bash\nyarn add @boubouw/discord-selfbot-v14\n```\n\n### Via GitHub\n\n```bash\ngit clone https://github.com/boubouw/discord.js-selfbot-v14.git\ncd discord.js-selfbot-v14\nnpm install\n```\n\n## Quick Start\n\n### Basic Example\n\n```javascript\nconst { Client } = require('@boubouw/discord-selfbot-v14');\n\n// Create client instance\nconst client = new Client({\n  intents: ['Guilds'],\n});\n\n// Listen for ready event\nclient.once('ready', () => {\n  console.log(`Connected as ${client.user.tag}`);\n});\n\n// Listen for messages\nclient.on('messageCreate', async (message) => {\n  // Ignore own messages\n  if (message.author.id === client.user.id) return;\n\n  console.log(`${message.author.username}: ${message.content}`);\n\n  // Respond to commands\n  if (message.content === '!ping') {\n    await message.channel.send('Pong!');\n  }\n});\n\n// Login with user token\nclient.login('YOUR_USER_TOKEN');\n```\n\n### Advanced Example with Commands\n\n```javascript\nconst { Client } = require('@boubouw/discord-selfbot-v14');\n\nconst client = new Client({\n  intents: ['Guilds', 'GuildMessages'],\n});\n\n// Command system\nclient.commands = new Map();\n\nclient.commands.set('ping', {\n  description: 'Test latency',\n  async execute(message, args) {\n    const sent = await message.channel.send('Pinging...');\n    await sent.edit(`Pong! (${sent.createdTimestamp - message.createdTimestamp}ms)`);\n  },\n});\n\nclient.on('messageCreate', async (message) => {\n  if (message.author.id === client.user.id) return;\n\n  if (message.content.startsWith('!')) {\n    const [commandName, ...args] = message.content.slice(1).split(/\\s+/);\n    const command = client.commands.get(commandName);\n\n    if (command) {\n      await command.execute(message, args);\n    }\n  }\n});\n\nclient.login('YOUR_USER_TOKEN');\n```\n\n## Documentation\n\n### Main Differences from discord.js\n\n1. **User Account Authentication**\n   - Uses user tokens instead of bot tokens\n   - No need for bot prefix in token\n   - Automatic WebSocket + Polling system setup\n\n2. **Message Reception**\n   - Hybrid WebSocket + Polling system for real-time messages\n   - Automatic deduplication of messages\n   - Intelligent channel caching\n\n3. **Rate Limit Handling**\n   - Built-in rate limit awareness\n   - Automatic retry mechanisms\n   - Smart polling intervals\n\n### API Reference\n\nThe API follows discord.js v14 conventions with these main exports:\n\n```javascript\nconst {\n  Client,           // Main client class\n  Collection,       // Data collection\n  GatewayIntentBits, // WebSocket intents\n  REST,             // REST client\n  Events,           // Discord events\n} = require('@boubouw/discord-selfbot-v14');\n```\n\n### Key Classes\n\n#### Client\n\nMain class for connecting to Discord with user accounts.\n\n```javascript\nconst client = new Client({\n  intents: ['Guilds'], // Optional intents\n  rest: {\n    api: 'https://discord.com/api',\n    version: '10',\n    timeout: 30000,\n  },\n});\n\nawait client.login('USER_TOKEN');\n```\n\n#### Managers\n\n- **GuildManager** - Manage guilds\n- **UserManager** - Manage users\n- **RelationshipManager** - Manage friends/blocked users\n- **ChannelManager** - Manage channels\n\n## Architecture\n\n### Hybrid WebSocket + Polling System\n\nThis package uses a unique hybrid approach:\n\n1. **WebSocket Connection** - Initial connection and sync\n2. **Intelligent Polling** - Real-time message reception\n3. **Smart Deduplication** - Prevents duplicate processing\n4. **Automatic Channel Loading** - Discovers and caches channels\n\nThis approach ensures:\n- ✅ Real-time message handling\n- ✅ Minimal rate limit issues\n- ✅ Reliable message delivery\n- ✅ Efficient resource usage\n\n## Examples\n\n### Command Handler\n\n```javascript\nconst fs = require('fs');\nconst { Client } = require('@boubouw/discord-selfbot-v14');\n\nconst client = new Client();\nclient.commands = new Map();\n\n// Load commands\nconst commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));\n\nfor (const file of commandFiles) {\n  const command = require(`./commands/${file}`);\n  client.commands.set(command.name, command);\n}\n\nclient.on('messageCreate', async (message) => {\n  if (!message.content.startsWith('!') || message.author.id === client.user.id) return;\n\n  const args = message.content.slice(1).trim().split(/ +/);\n  const commandName = args.shift().toLowerCase();\n  const command = client.commands.get(commandName);\n\n  if (command) {\n    try {\n      await command.execute(message, args);\n    } catch (error) {\n      console.error(error);\n      await message.channel.send('Error executing command!');\n    }\n  }\n});\n\nclient.login('YOUR_USER_TOKEN');\n```\n\n### Event Handler\n\n```javascript\nconst fs = require('fs');\nconst { Client } = require('@boubouw/discord-selfbot-v14');\n\nconst client = new Client();\n\nconst eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js'));\n\nfor (const file of eventFiles) {\n  const event = require(`./events/${file}`);\n  if (event.once) {\n    client.once(event.name, (...args) => event.execute(...args));\n  } else {\n    client.on(event.name, (...args) => event.execute(...args));\n  }\n}\n\nclient.login('YOUR_USER_TOKEN');\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/boubouw/discord.js-selfbot-v14.git\n\n# Install dependencies\nnpm install\n\n# Run linting\nnpm run lint\n\n# Run tests\nnpm test\n\n# Start development mode\nnpm start\n```\n\n## Requirements\n\n- [Node.js](https://nodejs.org/) >= 18.0.0\n- [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)\n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [discord.js](https://github.com/discordjs/discord.js) - The original discord.js framework\n- [discord.js-selfbot-v13](https://github.com/aiko-chan-ai/discord.js-selfbot-v13) - Inspiration for this project\n- [Discord](https://discord.com) - The platform we're building for\n\n## Support\n\n- 📧 [Issues](https://github.com/boubouw/discord.js-selfbot-v14/issues) - Bug reports and feature requests\n- 📚 [Documentation](https://github.com/boubouw/discord.js-selfbot-v14/wiki) - Full documentation\n- 💬 [Discord](https://discord.gg/) - Community support (coming soon)\n\n## Warning\n\n⚠️ **Using user tokens (selfbots) is against Discord's Terms of Service.**\n\nThis 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.\n\nAlways use official Discord bots for legitimate applications. This package should only be used for:\n\n- Educational purposes\n- Personal automation tasks\n- Understanding Discord's API\n- Testing and development\n\n---\n\n<div align=\"center\">\n\n  **Made with ❤️ by the community**\n\n  [⬆ Back to top](#discordjs-selfbot-v14)\n\n</div>\n","readmeFilename":"README.md","_rev":"1-b0cd904527c5b38f307aae3a7f7d058d"}