@alex110709/discord-user
v1.0.2
Published
Clawdbot Discord user account (selfbot) channel plugin
Maintainers
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-userFrom local directory
# Build the plugin
cd discord-user-plugin
npm install
npm run build
# Install to Clawdbot
clawdbot plugins install -l ./discord-user-pluginConfiguration
Getting your Discord User Token
- Open Discord in your browser (not the desktop app)
- Press F12 to open Developer Tools
- Go to the Network tab
- Send a message in any channel
- Look for a request to
messagesand click it - In the Headers tab, find the
Authorizationheader - 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:
- Log in as the Discord user
- Listen for messages in allowed channels/DMs
- 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 channeluser:USER_ID- Send to a user's DMCHANNEL_ID- Raw channel ID (sends to channel)
Security Considerations
- Token Security: Your Discord token is equivalent to your password. Keep it secret.
- ToS Violation: Selfbots violate Discord ToS. Your account may be banned without warning.
- Rate Limits: Discord has strict rate limits. Excessive automation can trigger them.
- 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 watchTroubleshooting
"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
