Skip to content
Browse the docs Discord

Discord

Connect an expert to Discord so people can ask it questions with the /ask slash command. It needs the Professional plan.

Discord only answers /ask. It doesn't read ordinary messages in a channel, so a question typed without the command gets no reply.

Before you start

  • A Discord account, and a server where you can add a bot. You need the Manage Server permission there.

Step 1: create the Discord application

  1. Open the Discord Developer Portal and choose New Application. Name it and accept the terms.
  2. On General Information, copy the Application ID, which is a long number, and the Public Key, which is 64 hexadecimal characters, meaning the digits 0 to 9 and the letters a to f.
  3. Open the Bot tab, choose Reset Token, and copy the token. Discord shows it once. If you lose it, reset it again.

Step 2: connect in Aimy

Open Integrations in the sidebar and choose Discord. Pick the expert from the Experts list on the left. A green dot beside an expert means Discord is already connected to it.

RowWhat to enter
Application IDThe Application ID, digits only.
Public keyThe Public Key, exactly 64 hexadecimal characters. Aimy refuses anything else.
Bot tokenThe token from the Bot tab.
Model for this channelOptional. Leave it on Use expert's model (default) or pick another model for Discord only. It saves as soon as you choose.

Choose Connect. Aimy registers the /ask command on your application at the same time, which also proves the Application ID and bot token belong together. If Discord refuses the token, one of the two is wrong.

Step 3: paste the Interactions endpoint URL into Discord

After you connect, an Interactions endpoint URL row appears with a Copy button. The (i) beside it says where it goes.

  1. Copy the URL.
  2. In the Developer Portal, on General Information, paste it into Interactions Endpoint URL and choose Save Changes.

Discord checks the address straight away and won't save one that fails. If it says it can't validate the endpoint, the public key is almost always wrong or was copied with a stray space.

Step 4: add the bot to your server

  1. In the Developer Portal, open OAuth2, then URL Generator, and tick applications.commands under scopes.
  2. Open the link it generates, choose your server, and authorise.

Step 5: try it

In a channel the bot can see, type /ask, pick the command, and enter a question your documents can answer. The command has one required option, question. You'll see thinking first, then the answer replaces it a few seconds later. Long answers are split across more than one message.

If something goes wrong, the error reply is visible only to the person who ran /ask, so nobody else in the channel sees it.

Each person's /ask questions in a channel are kept as one conversation in History.

A new command can take up to an hour to show up in every server. If /ask doesn't appear yet, wait before you change anything.

Checking and changing it later

  • The button beside Disconnect tests the saved credentials and registers /ask with Discord again. Its label starts with Test. Use it if /ask has gone missing.
  • To change the details, edit the rows and choose Replace credentials. The bot token shows as dots, so enter it again when you change anything.
  • Disconnect removes the saved details from Aimy. The /ask command stays registered on Discord, so clear the Interactions Endpoint URL in the Developer Portal to stop it appearing.

If something goes wrong

  • Discord won't save the endpoint URL. Check the public key on the Aimy page against the one in the portal.
  • /ask doesn't appear. Wait up to an hour, check you ticked applications.commands when you made the invite link, or use the button beside Disconnect that tests the credentials, so Aimy registers it again.
  • Discord says the application did not respond. The Interactions endpoint URL isn't saved in the portal, or it was copied wrongly.