Discord Setup
Discord Setup
Section titled “Discord Setup”1. Create a Discord application + bot
Section titled “1. Create a Discord application + bot”- Go to discord.com/developers/applications
- New Application → name it
- Sidebar → Bot → Add Bot
- Copy the bot token (you’ll only see it once)
2. Enable required intents and scopes
Section titled “2. Enable required intents and scopes”In the Bot tab:
- Enable the Message Content privileged intent
In the OAuth2 → URL Generator tab, when generating the invite URL, select scopes:
botapplications.commands
Bot permissions: at minimum Send Messages and Read Message History.
3. Invite the bot to your guild
Section titled “3. Invite the bot to your guild”Use the generated OAuth2 URL to invite the bot. Note the guild ID (right-click the server icon with developer mode on → Copy Server ID).
4. Configure Ptah
Section titled “4. Configure Ptah”Open Settings → Messaging → Discord:
- Paste the bot token (encrypted by the UI before persisting)
- Add the guild ID to Allowed guild IDs (
gateway.discord.allowedGuildIds) - Enable Discord (
gateway.discord.enabled = true) - Enable the global Messaging Gateway (
gateway.enabled = true)
5. Pair the binding
Section titled “5. Pair the binding”- In any allowed guild, message the bot (DM or @-mention in a channel it can read)
- The bot replies with a 6-digit pairing code
- Approve the binding in Settings → Messaging → Bindings
The Discord adapter is discord.js-compatible and shipped as DiscordAdapter.