Skip to content

Discord

Human can run as a Discord bot using the Discord API.

  • Build with -DHU_ENABLE_DISCORD=ON or -DHU_ENABLE_ALL_CHANNELS=ON
  • A Discord account and server
  1. Go to Discord Developer Portal
  2. Click New Application, name it, create
  3. Open Bot in the sidebar
  4. Click Add Bot
  5. Copy the token (click Reset Token if needed)
  6. Enable Message Content Intent (Privileged Gateway Intents) if the bot needs to read message content
  7. Note your Application ID (General Information)

Use this URL (replace YOUR_CLIENT_ID with your Application ID):

https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=274877975552&scope=bot

Permissions include: Send Messages, Read Message History, Read Messages/View Channels.

Add to ~/.human/config.json:

{
"channels": {
"discord": [
{
"token": "MTIzNDU2Nzg5MDEyMzQ1Njc4.ABcdEF.GhijKlmnOpqrstUvWxYz",
"guild_id": "1234567890123456789",
"allow_from": [],
"allow_bots": false
}
]
}
}
FieldTypeDescription
tokenstringBot token from Developer Portal
guild_idstringDiscord server (guild) ID
allow_fromarrayUser IDs allowed to interact. Empty = allow all
allow_botsboolWhether to respond to other bots (default: false)

Enable Developer Mode in Discord (Settings → App Settings → Advanced → Developer Mode). Right-click your server icon → Copy Server ID.

Incoming Discord events are received at the gateway path /webhook/discord or /discord. Configure your bot’s interaction endpoint or use a compatible event gateway.

Start the gateway and ensure the Discord channel is configured. The bot will connect and respond in the configured guild.