Skip to main content

Integrate to Discord

You can integrate your application to Discord by creating a Discord bot to receive and reply messages through your Discord channels or private chats. This guide will walk you through the steps to create a Discord bot and connect it to your TaskingAI application.

Prerequisites

  • A valid Discord account
  • Access to manage applications under your TaskingAI workspace

Step 1: Create a Discord Application

First you need to create a Discord Application that will be configured to connect with your TaskingAI application. To create a Discord Application, follow these steps:

  1. Visit the Discord Developer Portal at https://discord.com/developers/applications.
  2. Click the New Application button on the top right.

Discord Create Application

  1. Enter an Application Name and click the Create button. You will be redirected to the application's configuration page after this step.
  2. In General Information section, you can find the Application ID and Public Key of your application. Keep these values safe as you will need them later.

Step 2: Create a Discord Bot

  1. In the left sidebar, click the Bot tab.
  2. Click the Reset Token button to generate a new token for your bot. Keep this token safe as you will need it later.

Discord reset bot token

  1. Scroll down the page, and enable the Message Content Intent settings.
  2. Click the Save Changes button to save the settings.

Step 3: Register the Bot on TaskingAI

After the previous steps, you are ready to configure your Discord integration on TaskingAI platform.

  1. Log in to TaskingAI console, and navigate to the Applications tab under Workspace.
  2. Click on the application you want to integrate with Discord.
  3. On the tab selection bar on the top, click on the Channels tab.
  4. Select Discord and provide the necessary information, including Discord Application ID, Discord Application Public Key, and Discord Bot Token you obtained from previous steps.
  5. Click Activate after filling in the information.

Slack Integration

If the information provided is correct, a command named ask will be added to your discord bot. You can later use that command to send messages to your Discord bot and receive responses from your TaskingAI application after Step 4 is finished.

note

On the top of the configuration, a Webhook Url is displayed. You will need this URL to register a webhook on Slack in the next step.

Step 4: Register the Webhook URL on Discord

  1. Go back to the General Information section of your Discord Application.
  2. In the Interactions Endpoint URL setting under General Information, input the Webhook url obtained from Step3 as the URL.
  3. Click the Save Changes button to save the settings.

Discord interactions endpoint

Now, you are ready to use the bot's ask command to send messages to your Discord bot and receive responses from your TaskingAI application.

Step 5: Add bot to a Discord server

After the previous steps, you are ready to send direct messages to your Discord bot and receive responses from your TaskingAI application. If you want to add the bot to a server, follow these steps:

  1. Go to the Installation tab in your Discord Application.
  2. Under the Default Installation Settings section, make sure the applications.commands scope is included in the both install settings.
  3. Copy the link in the Install Link section and paste it to your target discord channel that you prefer to add the bot.
  4. Click the link to add the bot to the server.

Install link

info

You will find a command named ask added to your discord bot. You can use that command to send messages to your Discord bot and receive responses from your TaskingAI application. All messages other than the ask command will be ignored by the bot.

Install link

Step 6: Test your Discord integration

Now you can send messages to your Discord bot using the ask command and receive responses from your TaskingAI application.

Test discord integration

Test discord integration