Discord
PocketPaw integrates with Discord via discord.py. It supports slash commands, direct messages, and @mention in channels.
Setup
Create a Discord application
- Go to the Discord Developer Portal
- Click “New Application” and name it
- Go to the “Bot” section and create a bot
- Copy the bot token
Set permissions
Under OAuth2 → URL Generator, select:
- Scopes:
bot,applications.commands - Permissions:
Send Messages,Read Message History,Use Slash Commands
Invite to server
Use the generated URL to invite the bot to your Discord server.
Configure
export POCKETCLAW_DISCORD_BOT_TOKEN="your-discord-token"Start
pocketpaw --discordConfiguration
| Setting | Env Variable | Description |
|---|---|---|
| Bot token | POCKETCLAW_DISCORD_BOT_TOKEN | Discord bot token |
| Allowed guilds | POCKETCLAW_DISCORD_ALLOWED_GUILD_IDS | Comma-separated guild IDs |
| Allowed users | POCKETCLAW_DISCORD_ALLOWED_USER_IDS | Comma-separated user IDs |
Features
Slash Command
The bot registers a /paw slash command. Users can interact with:
/paw What files are in the home directory?DM and Mention Support
- Direct messages — Send a DM to the bot for private conversations
- @mention — Mention the bot in any channel where it’s present
Streaming
Discord supports edit-in-place streaming with a 1.5-second rate limit. The bot sends an initial message and edits it as tokens arrive, batching updates to respect Discord’s rate limits.
Access Control
# Restrict to specific serversexport POCKETCLAW_DISCORD_ALLOWED_GUILD_IDS="111222333,444555666"
# Restrict to specific usersexport POCKETCLAW_DISCORD_ALLOWED_USER_IDS="777888999"Installation
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the Discord extra manuallypip install pocketpaw[discord]This installs discord.py as an optional dependency.
Was this page helpful?