Package Information
Documentation
n8n-nodes-discord-user

Discord Self-Bot node for n8n - Automate Discord interactions using your user account.
β οΈ WARNING: Using self-bots violates Discord's Terms of Service. Use at your own risk. Your account may be banned.
Installation
In n8n (Recommended)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-discord-userin the npm Package Name field - Agree to the risks of using community nodes
- Click Install
Manual Installation
cd ~/.n8n/custom
npm install n8n-nodes-discord-user
# Restart n8n
Getting Started
1. Get Your Discord Token
- Open Discord in your web browser
- Press
F12to open Developer Tools - Go to the Network tab
- Send any message in Discord
- Look for requests to
discord.com/api - Find the
authorizationheader in request headers - Copy the token value
β οΈ NEVER share your token with anyone!
2. Configure Credentials in n8n
- Go to Credentials > New
- Search for Discord Self-Bot API
- Paste your Discord user token
- Click Save
3. Use the Node
Add the Discord Self-Bot node to your workflow and select an operation:
- Send Message - Send messages to channels
- Read Messages - Retrieve messages from channels
- React to Message - Add emoji reactions
- Edit Message - Edit your own messages
- Delete Message - Delete your own messages
- Get User Info - Retrieve user information
Features
- π€ Send Messages: Post messages to any channel you have access to
- π₯ Read Messages: Fetch recent messages from channels
- π React: Add emoji reactions to messages
- βοΈ Edit: Modify your own messages
- ποΈ Delete: Remove your own messages
- π€ User Info: Get detailed information about Discord users
Documentation
Getting Discord IDs
Enable Developer Mode in Discord (User Settings > Advanced > Developer Mode), then:
- Channel ID: Right-click channel β Copy ID
- Message ID: Right-click message β Copy ID
- User ID: Right-click user β Copy ID
Example Workflows
Simple Message Sender
{
"operation": "sendMessage",
"channelId": "123456789012345678",
"content": "Hello from n8n!"
}
Auto-Reply Bot
Monitor a channel and automatically reply to messages containing specific keywords.
Message Logger
Log all messages from specific channels to a database or spreadsheet.
Security & Privacy
- Discord tokens are stored securely using n8n's credential system
- Never commit tokens to version control
- Tokens are encrypted at rest
- Use separate Discord accounts for automation
Legal Disclaimer
IMPORTANT: Self-bots violate Discord's Terms of Service (Β§6.3). By using this node:
- Your Discord account may be terminated without warning
- The developers assume no responsibility for consequences
- You acknowledge using this tool at your own risk
This tool is provided for educational purposes only.
Troubleshooting
Error: Invalid Token
- Verify token was copied correctly
- Get a fresh token
- Check if account is locked
Error: Missing Permissions
- You can only interact with channels you have access to
- You can only edit/delete your own messages
Rate Limiting
- Discord enforces rate limits on API requests
- The node handles rate limits automatically
- Avoid excessive requests in quick succession
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format
Project Structure
n8n-nodes-discord-self/
βββ src/
β βββ credentials/
β β βββ DiscordSelfApi.credentials.ts
β βββ nodes/
β β βββ DiscordSelf/
β β βββ DiscordSelf.node.ts
β β βββ discord.svg
β βββ index.ts
βββ tests/
β βββ DiscordSelf.test.ts
βββ docs/
β βββ README.md
β βββ KOREAN.md
βββ examples/
β βββ workflow-example.json
βββ package.json
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
License
Resources
Changelog
1.0.0 (Initial Release)
- β¨ Send messages to channels
- β¨ Read messages from channels
- β¨ React to messages with emojis
- β¨ Edit and delete messages
- β¨ Get user information
- β¨ Comprehensive error handling
- β¨ TypeScript support
- β¨ Full test coverage
Made with β€οΈ for the n8n community