Introduction
Of course, you can already control mute, deafen, and a few other features using Hotkeys, but who has time to remember all those combinations that are setup especially between all the different programs you use. That is where this plug-in shines, it allows you to integrate directly with the Discord Client Application installed on your Windows or Mac system and keep in sync with changes made directly in the Discord client. The Discord API is limited with its capabilities, but the goal of the plug-in is to expose as much control over discord as it can. This plug-in was a huge accomplishment for me and the Touch Portal community and I’m proud to say it currently is the most downloaded plug-in. Another benefit to the plug-in, is all the code is open source and available on my GitHub for anybody that wants to dig through it and see how the magic happens, or if you want to contribute feel free to fork the repository and send in a pull request with your update.
The goal of this article is to get the Touch Portal Discord plug-in setup and give you some use case examples for what it can do. So, let’s dive in…
Plug-in Setup
Use Cases
Have Fun with It
Trouble Shooting
Plug-in Setup
If you prefer a video walk through, there are currently 2 available. The Franswah Studio’s setup guide and Spdermn02’s setup guide
First, we need to get ahold of the plug-in itself. Head on over to the GitHub releases page to fine the .tpp file to download. The .tpp file is all the contents needed for the plug-in to work. Make sure to download the correct one for your configuration. A majority of users will either need the TPDiscord-Win.tpp or TPDiscord-Mac.tpp for the default Windows and Mac Discord clients. The other .tpp files are specific for windows: If you run the PTB (pubilc test beta) version of Discord, download TPDiscord-PTB.tpp. If you run the Canary version of Discord, download TPDiscord-Win-DiscordCanary.tpp. If you live on the wildside and run the development version, download TPDiscord-Win-DEVELOPEMENT.tpp.
For the import to work the best, it is advised to make sure that your Discord client is up and running. If you haven’t restarted it in a while, may be a good time to make sure the connection for the API is available.
The next thing we need to do is import this plug-in into Touch Portal. This can be done by using the Gear in the top of the PC/Mac application and select “Import Plug-in”, navigate to where the .tpp file was downloaded and select it, and click “Open”
When the plug-in successfully loads, you will have 2 windows showing, one will ask you to review the starting command of the plug-in, and select “Trust Always” “OK” or “No”. If you want the plug-in to work without this prompt every time you restart Touch Portal it’s best to select “Trust Always”. Examples of the two are below:
Note: If this is your first Touch Portal plug-in: Do the following to make sure the rest of these steps work correctly, please fully restart Touch Portal. For Windows users right-click the System Tray icon for Touch Portal and choose "Restart" or "Exit", for Mac users Cmd+Q will work to fully close. Then reopen Touch Portal if you had fully closed it.
The windows version of the plug-in has a processes detector and will basically do nothing if it cannot detect that Discord is running. So, if nothing is happening after import or restart, that could be having a difficult time finding your Discord client. There is a setting to allow skipping this if you know for sure it is running properly. Check out this section below for that information.
Once Discord is detected as running, and no original configuration exists (because this is your first time importing it) the Discord Developer Portal should automatically open in your chosen default browser. If it doesn’t click here to open it up. Once there, and you are logged in with your Discord credentials, click the “New Application” button in the top right corner of the webpage. You will be presented a popup to give it a name, this can be whatever you want, for this setup we will use “TouchPortal Plugin” and click the “Create” button.
The first thing we will do after creating the application, is click the OAuth2 menu option on the left hand side. In the middle of the OAuth2 page, is a section called Redirects, we will need to click on the “Add Redirect” button and in the input box that displays type in (or copy) “http://localhost”. Make sure that this is http:// and not https://.
Next we will need to copy the Client ID and Client Secret from this page into the Touch Portal settings window for the Discord Plug-in. To get this panel open lets go back to Touch Portal for a moment. Click the Gear icon, select Settings. Then in that window on the left hand side select “Plug-ins” and in the dropdown on the right select “Touch Portal Discord Plug-in” (example below)
Now go back to the Discord Developer Portal web page and click the “Copy” button under the Client Id, navigate back to the above Touch Portal settings window and paste into the Discord Client Id input. Switch back to the webpage and click “Reset Secret” under the Client Secret (if you have 2FA enabled you will prompted for a token). Once the secret displays click “Copy” and paste that into the Discord Client Secret input in the Touch Portal settings window. Do NOT ever share your Discord Secret with anybody, if you feel it is compromised for this application, you can always regenerate it on the Discord Developer Portal web page.
To get these settings sent to the plug-in click the Save Button. If your Discord client is running, and was detected properly, the first connection should prompt you to authorize the plug-in, example below. Click “Authorize” and now you should be ready to use the actions available from the Plug-in!
Now that we have the Plug-in setup and connected to Discord. Let’s go through some use case examples to show why this plug-in is so awesome.
Use Cases
So say you want to run through all your servers and post in their self promotion channels for your Twitch/YouTube/Facebook live streams. Here is a way to do that with a touch of a button using Touch Portal and the Discord Plug-in. This will only work if/when the Discord client is focused, as it requires using the “Write Text” action that is a base Touch Portal action.
Now let’s setup how you would join your favorite Voice channel and see your current connection and voice Statistics
The text in the "Change title to" in the above statistics example is this text: Discord Voice Info: host: ${value:discord_voice_hostname} Ping: ${value:discord_voice_average_ping} Channel: ${value:discord_voice_channel_name} Mode: ${value:discord_voice_mode_type}
And finally we can control what type of “Input Mode” that is being used for Discord voice input. This example toggles between Voice Activity and Push-To-Talk and changes the button to display the current configuration, and what will happen if you push the button again.
Have fun with it!
Now that you have the Discord plug-in connected, have fun controlling Discord with the touch of your finger, instead of dealing with those pesky hotkeys. I hope you enjoy this plug-in, and we would love to see your creations posted to the The Franswah Studio or Touch Portal discord servers. If you are interested in learning more about Touch Portal check out The Franswah Studio’s YouTube channel, or the Touch Portal website.
Want to see more Touch Portal plug-ins available from Spdermn02, checkout my GitHub. All of my plug-ins are open source and available for download on their respective repositories.
If you want to jump in and chat with me, I stream on Twitch typically Tuesday, Thursday and Saturday at 9pm Central US time. Feel free to pop in and ask questions about this plug-in, any of my other plug-ins, or Touch Portal in general.
And finally if you are looking for plug-in support, you can ask on The Franswah Studio’s #applications channel, or on Touch Portal’s discord in the #discord channel. Feel free to tag @spdermn02 so I see your message.
A super nice starter page is available through the Touch Portal’s website created by a wonderful community member TodDZaum.
Trouble Shooting
- If you are having issues with getting the developer portal to auto open, the process watcher may not work for your PC. We need to go to the settings panel in Touch Portal like we did to copy in the Client ID and Seret and set the “Skip Process Watcher” setting to “Yes” (no quotes). Stop the plugin, then click Save. Reopen the settings panel and start the plug-in again, and hopefully that should help out.
- No Authorization popup, double check your Discord Developer Portal application you created, and make sure the redirect link is “http://localhost”