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.
Secondly, create a step integration in Torq.
Third, go back into Discord to generate an authorization URL
Add a New Bot to Discord
Go to the discord application creation page
Click "Create new application"
Copy and save the Application ID and Public Key
Go to Bot.
Generate a Bot Token, copy, and save it.
Create a Step Integration in Torq
In Torq, go to Build > Integrations > Steps > Discord.
Add the Application ID, Bot Token, and the Public Key (shown as Bot Public Key in the integration)
Click Add.
Generate a Discord URL for authorization
Go to the General Information section on the discord application creation
In Interactions Endpoint URL paste:
https://interactivity.torq.io/discord/v1/interactivity-hooks
Click Save
Go to OAuth2 > URL Generator
In Scopes, check the box labeled "bot"
In Bot Permissions > Text Permissions, check the box labeled "Send Messages"
Copy the Generated URL at the bottom of the page.
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
Find the user-ID or channel-ID you want to send your message to.
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.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.
Select either User or Channel in the Recipient field.
Write a clear and concise question within the Question field.
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.
Put your Channel or User ID in the correct field.
You can optionally add either Default response text or an automatic Timeout by going to the manage parameters icon.
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