Discord
  • 29 Mar 2023
  • 2 Minutes to read
  • Dark
    Light

Discord

  • Dark
    Light

Article Summary

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. 

⚠️ Important

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

First, follow the steps to add a new bot 

Secondly, create a step integration in Torq

Third, go back into Discord to generate an authorization URL

Add a new bot to Discord

  1.  Go to the discord application creation page
  2.  Click "Create new application" Screenshot of the Discord's general information tab with arrows pointing to application ID and public key
  3. Copy and save the Application ID and Public Key
  4.  Go to Bot.
  5. Generate a Bot Token, copy, and save it. 
    1. If the token is not shown, press Reset TokenScreenshot of the build-a-bot Discord screen with an arrow pointing at the token copy button

Create a Step Integration in Torq

  1.  In Torq, go to Integrations > Steps > Discord 
  2.  Add the Application ID, Bot Token, and the Public Key (shown as Bot Public Key in the integration) discord8
  3.  Click Add.

Generate a Discord URL for authorization

  1.  Go to the General Information section on thediscord application creation
  2.  In Interactions Endpoint URL paste: https://interactivity.torq.io/discord/v1/interactivity-hooks Pasting the necessary url into the Interactions Endpoint in Discord
  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. Gif of OAuth section in the bot with the permissions being chosen
  8. Follow the Generated URL and authorize it on your desired server.   
    Gif of Torq bot being authorized onto the Discord server

     

🗒️ Note
Discord's rate limit is 5 requests per second.

Ask a question with your 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. discord14
  5.  Put your Channel or User ID in the correct field. discord10
  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. discord11discord12

Trigger workflows with Discord Slash commands 

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




Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.