Connect Discord to Dchat

Setup guide · Discord

Add an /ask command to your Discord server. Members ask a question and the AI answers in the channel, from the same knowledge as your website chat.

Before you start

  • Difficulty: Medium
  • Time: 15 minutes
  • You need: A Discord server you can add apps to
  • You need: Admin or owner access to your Dchat workspace

Steps

  1. Create a Discord application

    In the Discord Developer Portal, create an application. Copy the Application ID and Public Key from General Information, then open Bot, reset the token and copy it.

  2. Add the channel in Dchat

    In Dchat, open Settings → Channels and choose + Add channel. Pick "Discord", leave the identifier empty, and paste the credentials. Saving registers the /ask command and shows your Interactions Endpoint URL.

    { "ApplicationId": "123...", "PublicKey": "64 hex characters", "BotToken": "..." }
  3. Paste the Interactions Endpoint URL

    Back on General Information, paste the URL Dchat showed and save; Discord checks it immediately. It has this form:

    https://api.dchat.com/api/inbound/discord/{channel id}
  4. Invite the bot and try /ask

    Invite the application to your server with the bot and applications.commands scopes, then type /ask followed by a question.

What goes in each field

  • ApplicationId: The number on the application's General Information page.
  • PublicKey: The 64-character hex key on General Information; Dchat checks Discord's signature with it.
  • BotToken: From the Bot page.

Good to know

  • Members use /ask; ordinary channel messages are not answered.
  • Registering /ask replaces the application's other global commands, so use a dedicated application.
  • Discord allows replies for 15 minutes after the question; a later team reply shows a delivery warning instead.
  • Replies are up to 2,000 characters with up to 5 buttons.
  • Your workspace needs at least one enabled site; new workspaces have one already. Messages are dropped while every site is switched off.
  • Credentials are encrypted when you save them and are never shown again. To change one, paste the full credentials again.

Discord works best for community questions; account-specific help is better moved to a private channel like the website chat.