{"_id":"@alex110709/discord-user","_rev":"4-bc9e5abb05c0eac2468392c2c9a74b7f","name":"@alex110709/discord-user","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@alex110709/discord-user","version":"1.0.0","keywords":["clawdbot","clawdbot-plugin","clawdbot-extension","discord","discord-selfbot","selfbot","user-account","automation"],"author":{"name":"HITEYY"},"license":"MIT","_id":"@alex110709/discord-user@1.0.0","maintainers":[{"name":"alex110709","email":"legoflower9@gmail.com"}],"homepage":"https://github.com/HITEYY/clawdbot-discord-user#readme","bugs":{"url":"https://github.com/HITEYY/clawdbot-discord-user/issues"},"dist":{"shasum":"399740a0016f76965a91cc08521a2f2cd2dcef2e","tarball":"https://registry.npmjs.org/@alex110709/discord-user/-/discord-user-1.0.0.tgz","fileCount":20,"integrity":"sha512-VQYiVQW6+HDDROctyofcG5Idw+UeNlv0Gu2uVVGFefq2n4ge9dIGgxWeu0CmGpdwE74nr0hshGmrugQCyiNYAQ==","signatures":[{"sig":"MEYCIQDWs+z0eWn5h4+z1ZxALYaNA+xm1QOz5kICqwkccikThwIhAOdVNKgTYOQVR3DmoqhaiAmvlYLBq+zVXMPstYT1zD06","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60391},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"76646e5ead1bff889d0938056788d67f174a99f1","scripts":{"build":"tsc","clean":"rm -rf dist","watch":"tsc -w","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"alex110709","email":"legoflower9@gmail.com"},"clawdbot":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/HITEYY/clawdbot-discord-user.git","type":"git"},"_npmVersion":"10.9.4","description":"Clawdbot Discord user account (selfbot) channel plugin","directories":{},"_nodeVersion":"22.22.0","dependencies":{"discord.js-selfbot-v13":"^3.5.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"peerDependencies":{"clawdbot":"*"},"_npmOperationalInternal":{"tmp":"tmp/discord-user_1.0.0_1769519005248_0.7371624655030546","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alex110709/discord-user","version":"1.0.1","keywords":["clawdbot","clawdbot-plugin","clawdbot-extension","discord","discord-selfbot","selfbot","user-account","automation"],"author":{"name":"HITEYY"},"license":"MIT","_id":"@alex110709/discord-user@1.0.1","maintainers":[{"name":"alex110709","email":"legoflower9@gmail.com"}],"homepage":"https://github.com/HITEYY/clawdbot-discord-user#readme","bugs":{"url":"https://github.com/HITEYY/clawdbot-discord-user/issues"},"dist":{"shasum":"907966070ea554291395b62fd78114681c6d6c2c","tarball":"https://registry.npmjs.org/@alex110709/discord-user/-/discord-user-1.0.1.tgz","fileCount":20,"integrity":"sha512-sMUn2ZH+nZuczKH53PX/+OV7EtokeM2wejob6pdmUVlF52m6EPeJ+hXhntL4ruYoWCoB0CKrV32ktBSbhvdCXA==","signatures":[{"sig":"MEUCIEHMt6/MlM1K+HMWRYFEyDQw8VznFx41hU0hmN21Cy85AiEAoC5MLPv2Nt255+SmY8uCKb9eg2gxkNqc4zgn7s3PM7c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60395},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"10491155a52e2d8ac34473b7d148438a1122706d","scripts":{"build":"tsc","clean":"rm -rf dist","watch":"tsc -w","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"alex110709","email":"legoflower9@gmail.com"},"clawdbot":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/HITEYY/clawdbot-discord-user.git","type":"git"},"_npmVersion":"11.7.0","description":"Clawdbot Discord user account (selfbot) channel plugin","directories":{},"_nodeVersion":"25.4.0","dependencies":{"discord.js-selfbot-v13":"^3.5.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"peerDependencies":{"clawdbot":"*"},"_npmOperationalInternal":{"tmp":"tmp/discord-user_1.0.1_1769519133166_0.5437607638782482","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alex110709/discord-user","version":"1.0.2","keywords":["clawdbot","clawdbot-plugin","clawdbot-extension","discord","discord-selfbot","selfbot","user-account","automation"],"author":{"name":"HITEYY"},"license":"MIT","_id":"@alex110709/discord-user@1.0.2","maintainers":[{"name":"alex110709","email":"legoflower9@gmail.com"}],"homepage":"https://github.com/HITEYY/clawdbot-discord-user#readme","bugs":{"url":"https://github.com/HITEYY/clawdbot-discord-user/issues"},"dist":{"shasum":"b0f5d8771b505d518eaf8be81754decbfed48129","tarball":"https://registry.npmjs.org/@alex110709/discord-user/-/discord-user-1.0.2.tgz","fileCount":15,"integrity":"sha512-Fd+5l5iAqpvZczk8ljN01VJv3Z39qnAZ+nljqXvVHVdMV6g44hXE0szLZ39NchUhVwMN4L5YWMcBtJgBllTRfQ==","signatures":[{"sig":"MEQCIEXo8EsZWjrtlq1mtV+mgmi5B5EVV+jAXOo/GoOO28CmAiBiXMhViNrERZfw9lBKIob5aFjWwmXOwCOjeeRARm2yHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79667},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"884b9d0cd544f124068f2fe96e58b0612f0ea63a","scripts":{"build":"tsc","clean":"rm -rf dist","watch":"tsc -w","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"alex110709","email":"legoflower9@gmail.com"},"clawdbot":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/HITEYY/clawdbot-discord-user.git","type":"git"},"_npmVersion":"11.7.0","description":"Clawdbot Discord user account (selfbot) channel plugin","directories":{},"_nodeVersion":"25.4.0","dependencies":{"discord.js-selfbot-v13":"^3.5.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"peerDependencies":{"clawdbot":"*"},"_npmOperationalInternal":{"tmp":"tmp/discord-user_1.0.2_1769733359389_0.6486455248903609","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@alex110709/discord-user","version":"1.0.3","type":"module","description":"openclaw Discord user account (selfbot) channel plugin","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","watch":"tsc -w","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"openclaw":{"extensions":["./dist/index.js"]},"repository":{"type":"git","url":"git+https://github.com/HITEYY/openclaw-discord-user.git"},"homepage":"https://github.com/HITEYY/openclaw-discord-user#readme","bugs":{"url":"https://github.com/HITEYY/openclaw-discord-user/issues"},"author":{"name":"HITEYY"},"license":"MIT","dependencies":{"discord.js-selfbot-v13":"^3.5.2"},"peerDependencies":{"openclaw":"*"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.4.0"},"keywords":["openclaw","openclaw-plugin","openclaw-extension","discord","discord-selfbot","selfbot","user-account","automation"],"engines":{"node":">=18.0.0"},"_id":"@alex110709/discord-user@1.0.3","gitHead":"c05604c90446be729f228c34464be18ec3bf5ae6","_nodeVersion":"24.6.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-2gNzDdLyCYWm7XWdE79dFGhWnbAqMqcP7UUGecs5gy6ymdKBtvF2B8DLiSJozfzAL5NGRXl3Bnbh5DGQMYD/Vw==","shasum":"57e05c39f370dcfd1766e8dc98317e1a16f59840","tarball":"https://registry.npmjs.org/@alex110709/discord-user/-/discord-user-1.0.3.tgz","fileCount":15,"unpackedSize":178085,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1SduoNZRvA7+CiGSR+Gvjw2t3j2UYTJUZUUckgG+9AQIgUThntdTWb2avHyPWKMm4UKGI4RIrHs0lZsR+wAhO5/I="}]},"_npmUser":{"name":"alex110709","email":"legoflower9@gmail.com"},"directories":{},"maintainers":[{"name":"alex110709","email":"legoflower9@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/discord-user_1.0.3_1770992588199_0.9466843831897351"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T13:03:25.136Z","modified":"2026-02-13T14:23:08.484Z","1.0.0":"2026-01-27T13:03:25.402Z","1.0.1":"2026-01-27T13:05:33.324Z","1.0.2":"2026-01-30T00:35:59.544Z","1.0.3":"2026-02-13T14:23:08.372Z"},"bugs":{"url":"https://github.com/HITEYY/openclaw-discord-user/issues"},"author":{"name":"HITEYY"},"license":"MIT","homepage":"https://github.com/HITEYY/openclaw-discord-user#readme","keywords":["openclaw","openclaw-plugin","openclaw-extension","discord","discord-selfbot","selfbot","user-account","automation"],"repository":{"type":"git","url":"git+https://github.com/HITEYY/openclaw-discord-user.git"},"description":"openclaw Discord user account (selfbot) channel plugin","maintainers":[{"name":"alex110709","email":"legoflower9@gmail.com"}],"readme":"# @alex110709/discord-user\n\nopenclaw plugin for Discord **user account** (selfbot) integration. This allows openclaw to act as a real Discord user, not a bot.\n\n> ⚠️ **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.\n\n## Features\n\n- Login as a real Discord user account\n- Send and receive messages in DMs, channels, and threads\n- React to messages\n- Send media attachments\n- Typing indicators\n- Message history fetching\n- Voice call controls (ring/join/leave/mute/deafen/status)\n- Server administration actions (roles/moderation/channel management)\n\n## Installation\n\n### From npm (when published)\n\n```bash\nopenclaw plugins install @alex110709/discord-user\n```\n\n### From local directory\n\n```bash\n# Build the plugin\ncd discord-user-plugin\nnpm install\nnpm run build\n\n# Install to openclaw\nopenclaw plugins install -l ./discord-user-plugin\n```\n\n## Configuration\n\n### Getting your Discord User Token\n\n1. Open Discord in your browser (not the desktop app)\n2. Press F12 to open Developer Tools\n3. Go to the Network tab\n4. Send a message in any channel\n5. Look for a request to `messages` and click it\n6. In the Headers tab, find the `Authorization` header - this is your token\n\nOr use browser console:\n```javascript\n// In Discord web app console\n(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()\n```\n\n### Config file\n\nAdd to your openclaw config (`~/.openclaw/config.json5`):\n\n```json5\n{\n  channels: {\n    \"discord-user\": {\n      enabled: true,\n      token: \"YOUR_DISCORD_USER_TOKEN\",\n      // Or use environment variable: DISCORD_USER_TOKEN\n      \n      // DM policy: \"open\" | \"pairing\" | \"allowlist\"\n      dmPolicy: \"pairing\",\n      \n      // Allowed user IDs for DMs\n      allowFrom: [\"123456789012345678\"],\n      \n      // Group/channel policy: \"open\" | \"allowlist\"\n      groupPolicy: \"allowlist\",\n      \n      // Guild/channel allowlist\n      guilds: {\n        \"GUILD_ID\": {\n          enabled: true,\n          channels: {\n            \"CHANNEL_ID\": true\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n#### Group policy behavior\n\n- `groupPolicy: \"allowlist\"`: only guild/channels configured under `guilds` can trigger.\n- `groupPolicy: \"open\"`: all guild channels can trigger by default.\n- You can explicitly block in `open` mode using `enabled: false` on a guild or channel entry.\n\nExample deny rule:\n\n```json5\n{\n  channels: {\n    \"discord-user\": {\n      groupPolicy: \"open\",\n      guilds: {\n        \"GUILD_ID\": {\n          enabled: true,\n          channels: {\n            \"CHANNEL_ID\": false // explicitly blocked\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n### Environment variable\n\n```bash\nexport DISCORD_USER_TOKEN=\"your_token_here\"\n```\n\n### Multi-account setup\n\n```json5\n{\n  channels: {\n    \"discord-user\": {\n      enabled: true,\n      accounts: {\n        main: {\n          token: \"TOKEN_1\",\n          name: \"Main Account\"\n        },\n        alt: {\n          token: \"TOKEN_2\",\n          name: \"Alt Account\"\n        }\n      }\n    }\n  }\n}\n```\n\n## Usage\n\nOnce configured and the gateway is running, openclaw will:\n\n1. Log in as the Discord user\n2. Listen for messages in allowed channels/DMs\n3. Respond as configured by your openclaw setup\n\n### Sending messages\n\nThe plugin integrates with openclaw's messaging system. You can send messages using:\n\n```bash\n# CLI\nopenclaw send --channel discord-user --to \"channel:CHANNEL_ID\" \"Hello!\"\nopenclaw send --channel discord-user --to \"user:USER_ID\" \"Hello!\"\n\n# Or via message tool in agent\nmessage action=send channel=discord-user to=\"channel:123456789\" message=\"Hello!\"\n```\n\n### Target formats\n\n- `channel:CHANNEL_ID` - Send to a text channel\n- `user:USER_ID` - Send to a user's DM\n- `CHANNEL_ID` - Raw channel ID (sends to channel)\n\n\n### Extended actions\n\nThe plugin also exposes action endpoints for advanced channel control:\n\n- `react` / `deleteMessage` / `editMessage`\n- `typing`\n- `fetchMessages` / `fetchMessage`\n- `getChannelInfo`\n- `setStatus`\n- `addFriend` / `removeFriend`\n- `listGuilds` / `leaveGuild` / `joinGuild`\n- Roles: `listRoles` / `createRole` / `editRole` / `deleteRole` / `addRoleToUser` / `removeRoleFromUser` / `setUserRoles`\n- Moderation: `setNickname` / `kickUser` / `banUser` / `unbanUser` / `timeoutUser`\n- Channels: `listChannels` / `createChannel` / `editChannel` / `deleteChannel`\n- `callUser` / `voiceJoin` / `voiceLeave` / `voiceStatus` / `setVoiceState`\n\nVoice call examples:\n\n```bash\n# Ring a user in DM\nmessage action=callUser channel=discord-user userId=\"123456789012345678\"\n\n# Join a guild voice channel\nmessage action=voiceJoin channel=discord-user channelId=\"123456789012345678\"\n\n# Mute/deafen self in the current voice session\nmessage action=setVoiceState channel=discord-user selfMute=true selfDeaf=true\n\n# Check current voice state\nmessage action=voiceStatus channel=discord-user\n\n# Leave current voice session\nmessage action=voiceLeave channel=discord-user\n```\n\nServer management examples:\n\n```bash\n# Add a role to a user\nmessage action=addRoleToUser channel=discord-user guildId=\"GUILD_ID\" userId=\"USER_ID\" roleId=\"ROLE_ID\"\n\n# Kick a user\nmessage action=kickUser channel=discord-user guildId=\"GUILD_ID\" userId=\"USER_ID\" reason=\"rule violation\"\n\n# Timeout user for 30 minutes\nmessage action=timeoutUser channel=discord-user guildId=\"GUILD_ID\" userId=\"USER_ID\" minutes=30\n\n# Create a text channel\nmessage action=createChannel channel=discord-user guildId=\"GUILD_ID\" name=\"ops-log\" type=\"text\"\n\n# Edit slowmode on a channel\nmessage action=editChannel channel=discord-user channelId=\"CHANNEL_ID\" slowmode=10\n```\n\n## Security Considerations\n\n1. **Token Security**: Your Discord token is equivalent to your password. Keep it secret.\n2. **ToS Violation**: Selfbots violate Discord ToS. Your account may be banned without warning.\n3. **Rate Limits**: Discord has strict rate limits. Excessive automation can trigger them.\n4. **Account Safety**: Use a secondary account if possible.\n\n## Differences from Bot Account\n\n| Feature | Bot Account | User Account (Selfbot) |\n|---------|------------|----------------------|\n| ToS Compliant | ✅ Yes | ❌ No |\n| Nitro Features | ❌ No | ✅ Yes (if subscribed) |\n| Join Servers | Invite link | Normal join |\n| DM Anyone | ❌ Restricted | ✅ Yes |\n| Read Messages | Only with intent | ✅ All visible |\n| Slash Commands | ✅ Yes | ❌ No (can't create) |\n| Polls | ✅ Yes | ❌ No (can't create) |\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Watch mode\nnpm run watch\n```\n\n## Troubleshooting\n\n### \"Invalid token\"\n- Make sure you're using a user token, not a bot token\n- User tokens don't start with \"Bot \" prefix\n- Token may have expired - get a new one\n\n### \"Rate limited\"\n- Reduce message frequency\n- Add delays between operations\n- Discord rate limits are stricter for user accounts\n\n### \"Cannot access channel\"\n- User must have permission to view the channel\n- Check if user is in the guild\n- Verify channel ID is correct\n\n## License\n\nMIT\n","readmeFilename":"README.md"}