Skip to main content
Discord

Learn to integrate Discord with Torq and automate chatbots and workflows.

Updated over 3 months ago

Discord is a communication platform with text, voice, and video chat abilities, multiple channels, and guild functionality.

Follow the steps below to add a Torq bot to your Discord channels. This can act as both a trigger and a step integration.

Follow the steps exactly in order, or the integration will not work.

First, follow the steps to add a new bot.

Third, go back into Discord to generate an authorization URL

Add a New Bot to Discord

  1. Click "Create new application"

  2. Copy and save the Application ID and Public Key

  3. Go to Bot.

  4. Generate a Bot Token, copy, and save it.

    1. If the token is not shown, press Reset Token.

Create a Step Integration in Torq

  1. In Torq, go to Build > Integrations > Steps > Discord.

  2. Add the Application ID, Bot Token, and the Public Key (shown as Bot Public Key in the integration)

  3. Click Add.

Generate a Discord URL for authorization

  1. Go to the General Information section on the discord application creation

  2. In Interactions Endpoint URL paste:

    https://interactivity.torq.io/discord/v1/interactivity-hooks
  3. Click Save

  4. Go to OAuth2 > URL Generator

  5. In Scopes, check the box labeled "bot"

  6. In Bot Permissions > Text Permissions, check the box labeled "Send Messages"

  7. Copy the Generated URL at the bottom of the page.

  8. Follow the Generated URL and authorize it on your desired server.

Discord's rate limit is 5 requests per second

Ask a Question with the Torq Bot

  1. Find the user-ID or channel-ID you want to send your message to.

    1. User-ID: Within the server, right-click the username and click Copy ID.
      Within Torq, run either the Search guild members or List guild members steps to find your user.

    2. Channel-ID: Within the server, right-click a message in the channel. This will get you both the channel and the message ID - the channel ID is the first string of numbers before the dash.
      Within Torq, run either the Get channel or the List guild channels step.

  2. Select either User or Channel in the Recipient field.

  3. Write a clear and concise question within the Question field.

  4. Write your list of possible responses in the Responses field. The responses must be separated by a comma, with no space in between each response. There can be a space within the text of an individual response.

  5. Put your Channel or User ID in the correct field.

  6. You can optionally add either Default response text or an automatic Timeout by going to the manage parameters icon.

  7. The message response will be sent back to Torq immediately upon a response being selected.

Trigger Workflows with Discord Slash Commands

Discord slash commands are a quick way to communicate with Discord bots, including the Torq bot.

Premade Steps

These are the premade steps for Discord. Don't see the step you need? No problem; you can easily create custom steps.

  • Ask a question

  • Get channel

  • Get guild

  • List channel messages

  • List guild channels

  • List guild members

  • List guilds

  • List thread members

  • Search guild members

  • Send message

Did this answer your question?