From nanotars-discord
Installs Discord channel plugin for NanoTars/Claude Code, sets up bot with token, and registers text channels/DMs via pairing codes alongside WhatsApp.
npx claudepluginhub terrifiedbug/nanotars-skills --plugin nanotars-discordThis skill uses the workspace's default tool permissions.
This skill installs the Discord channel plugin and registers a Discord chat.
Adds Discord bot channel to ClaudeClaw: merges code from qwibitai/claudeclaw-discord repo, validates with npm build and vitest, guides interactive bot token setup and .env config.
Installs and configures Telegram as a NanoTars channel plugin with bot setup, authentication, trigger-based control, passive notifications, and agent swarm support.
Installs Slack channel plugin using Socket Mode (no public URL). Guides app creation, Socket Mode enablement, bot scopes, event subscriptions, token setup, and channel invites.
Share bugs, ideas, or general feedback.
This skill installs the Discord channel plugin and registers a Discord chat.
If the plugin is already installed (check plugins/channels/discord/), skip to "Register a Chat" below.
Before installing, verify NanoTars is set up:
[ -d node_modules ] && echo "DEPS: ok" || echo "DEPS: missing"
docker image inspect nanoclaw-agent:latest &>/dev/null && echo "IMAGE: ok" || echo "IMAGE: not built"
if grep -q "ANTHROPIC_API_KEY\|CLAUDE_CODE_OAUTH_TOKEN" .env 2>/dev/null || [ -f "$HOME/.claude/.credentials.json" ]; then echo "AUTH: ok"; else echo "AUTH: missing"; fi
If any check fails, tell the user to run /nanotars-setup first and stop.
Tell the user:
I need you to create a Discord bot:
- Go to the Discord Developer Portal
- Click New Application, give it a name
- Go to Bot in the left sidebar
- Click Reset Token and copy the bot token
- Under Privileged Gateway Intents, enable:
- Message Content Intent (required to read message text)
- Server Members Intent (optional, for display names)
- Go to OAuth2 > URL Generator:
- Scopes:
bot- Bot Permissions:
Send Messages,Read Message History,View Channels- Copy the generated URL and open it to invite the bot to your server
Wait for the user to provide the bot token.
Note on DMs: You must share at least one server with the bot before you can DM it directly.
Install discord.js (per-plugin dependency):
cd plugins/channels/discord && npm install && cd -
The plugin has its own package.json — dependencies are isolated from the core.
Check if plugin files exist:
[ -d plugins/channels/discord ] && echo "PLUGIN_EXISTS" || echo "NEED_PLUGIN"
If needed, copy channel plugin files into place:
mkdir -p plugins/channels/discord
cp -r ${CLAUDE_PLUGIN_ROOT}/files/* plugins/channels/discord/
Add bot token to .env (get from user, never echo full token):
echo "DISCORD_BOT_TOKEN=user_provided_token" >> .env
Rebuild and restart:
npm run build
nanotars restart 2>/dev/null
Verify the bot connected:
sleep 3 && grep -i 'discord.*connected' logs/nanotars.log | tail -1
Use the cross-channel pairing-code flow (same primitive that backs WhatsApp + Telegram):
/register-group <folder>. The host emits a 4-digit code.Manually finding a channel ID (only if needed for documentation / scripted setup):
dc:CHANNEL_IDFor the first-ever main chat (when no other channel is registered), use nanotars pair-main from the install host instead — it issues a code that the channel plugin's inbound interceptor will consume to bootstrap the main group.
tail -20 logs/nanotars.log | grep -i discordDISCORD_BOT_TOKEN in .env/list-groups from your main chat to confirm the Discord chat is registered. Don't reach into the SQLite schema directly — the entity-model migration will silently break inline SQL.requiresTrigger: falseSend Messages permission in the channelUse /nanotars-remove-plugin for a guided removal — it stops the service, removes the plugin directory, cleans up channel data, and removes registered-group entries via the proper IPC primitives. Manual steps if needed:
nanotars stop
From your main chat (before stopping), run /delete-group <folder> for each Discord-wired group you want to remove. Skip this if you want the agent_group rows preserved for re-wiring to a different channel.
rm -rf plugins/channels/discord/
Remove DISCORD_BOT_TOKEN from .env
nanotars restart
Restart NanoTars — group folders and message history are preserved.