GithubHelp home page GithubHelp logo

croutonn / touchportal_discord_plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spdermn02/touchportal_discord_plugin

0.0 0.0 0.0 250.44 MB

Touch Portal Plugin to Interact with Discord

License: GNU General Public License v3.0

JavaScript 12.93% Shell 0.11% PLSQL 86.96%

touchportal_discord_plugin's Introduction

Touch Portal Plugin to Interact with Discord

Description

Mute and Deafen Discord directly from Touch Portal with only Minor configuration needed
Jump to specific Voice or Text channels on servers you joiend to
Hangup voice calls
See Voice Connection Stats (server, ping)
Toggle/Set Push To Talk or Voice Activity Modes
Set Push To Talk Hotkey Combinations

ChangeLog

pre-v4.0.0
  - Mute yourself in Discord
  - Deafen yourself in Discord
  - Worked on fixing connection issues
v4.0.0
  Additions:
    - Action for Voice Mode Changes - PTT to Voice Activity (and back again)
    - Action for Push-To-Talk Hotkey Changing
    - Action to Go to specific Voice or Text channel within a Discord server you belong to
    - If in a Voice Channel allow you to hang up the call
    - Voice Connection Statistics
        Voice Server
        Ping Average
    - State for Voice Channel Connected to
    - State for Voice Mode Type
    - Watch for Discord.exe to be running before attempting to connect, polls every 10 seconds so could cause slight delay in connection if start up is slow (Win Only, still working Mac)
  Updates:
    - Reworked to with Touch Portal v2.3 plugin api enhancement/changes
    - Settings moved from custom built config to inside Touch Portal (will require reconfiguration using discord dev app you already have setup)
      - Will now request authorization EACH time Touch Portal (or the plug-in) starts, this way guaranteeing your Access Token is fresh
        - *Note*: May be reworked in the future to store Access Token but found issues with this implementation during development. 
  Bug Fixes:
    - Added bug fix from pre-v4.0.0 here as well - longer wait times between attempted reconnect
v4.0.1
  - Can't remember.. brain fried
v4.0.2
  Updates:
    - Setting to tell you if Discord was successfully connected to - Valid values are 'Disconnected' or 'Connected'
    - (Windows Only) Setting to disable the Process Watcher if for some reason your system isn't recongizing the application properly.
      - *Note*: This could require a stop/start of TPDiscord if Discord closes while authenticated, this can be done inside Touch Portal Settings -> Plug-Ins -> Select "Touch Portal Discord Plugin" and clicking the Stop button, wait a few seconds, click the Start button
v4.0.3
   Bug Fix:
    - Fixing Voice Activity and PTT switching

Plugin Capabilities

Actions

  • Discord Mute - Mute yourself in Discord
  • Discord Deafen - Deafen yourself in Discord (inherently mutes as well)
  • Discord Hang Up - When in a voice call this will hang up the voice call
  • Discord Select Channel - go to a specific voice/text channel in a given server
  • Discord Reset Push To Talk Keys - resets array inside the plugin, doesn't affect Discord directly
  • Discord Push To Talk Key - adds key to the push to talk key array inside the plugin, doesn't affect Discord Directly
  • Discord Store Push To Talk Keys - store the key combinations in the push to talk key array to Discord to use with Push to Talk

States

  • Discord Mute
    • Valid Values: Yes, No
  • Discord Deafen
    • Valid Values: Yes, No
  • Discord Voice Channel Connected
    • Valid Values: Yes, No
  • Discord Voice Channel Name
    • Value: Connected channel name or <None>
  • Discord Voice Average Ping
    • Value: in milliseconds)
  • Discord Voice Hostname
    • Value: Voice Host connected to at Discord
  • Discord Voice Mode Type
    • Valid Values: PUSH_TO_TALK, VOICE_ACTIVITY

Installation and Configuration

  1. Make sure Discord app is open on your PC or Mac
  2. Download the .tpp file the installer for your OS Windows OR MacOS:
  3. Go to Touch Portal Settings (the gear icon)
  4. Go To Plug-ins
  5. Click the Import Plug-in button
  6. Navigate to the downloaded tpp file, select it and press Open
  7. A popup should tell you Successfully Imported plugin
    1. If this is your first time importing, you will be asked To Trust the Plugin, to prevent this from popping up each time you start Touch Portal, click Trust Always
  8. Now Select Touch Portal Discord Plugin in the dropdown on the Plug-ins settings page
  9. The Discord Application page should have auto opened on your PC in your browser
    1. if not Visit: Discord Developer Portal
  10. Login with your Discord Credentials
  11. If you already have an application from previous plugin usage, skip to Step 20.
  12. Go to "Applications" on the left side of the portal
  13. Click "New Application" in the top right of the Applications page
  14. Name your Application "Touch Portal Plugin" (or whatever you want to call it), and click "Create"
  15. Go to "OAuth2" on the left side of the Site
  16. Click the "Add Redirect" button
  17. Enter in: http://localhost exactly, not trailing slash, and not https://
  18. Go to OAuth2 URL Generator section, and in the dropdown "SELECT REDIRECT URL" select the only entry
  19. Click "Save Changes"
  20. Locate the Client Id and click the "Copy" button, go to the Touch Portal Settings Window and paste in the client id into the "Discord Client Id" field
  21. Go back to the developer portal website
  22. Locate the Client Secret and click the "Copy" button, go to Touch Portal Settings window and paste in the client secret into the "Discord Client Secret" field
    1. Example:
      Discord Settings
  23. Click "Save"
  24. After a few seconds, you should get asked to authorize the application you created as a plugin in Discord, click "Authorize"
    1. Example: I do NOT have the plugin reading all your messages but in order to use this plugin, it needs that scope
      TP Authorize
  25. If for some reason, you mis-clicked and the authorize window went away
    1. Click the Stop button on the Touch Portal Discord Plugin settings page
    2. Then Click Start button and it should then re-ask you to authorize
  26. Now you should be able to use the new functions of the Touch Portal Discord Plugin!

Known Issues & Solutions

  1. My Buttons no longer work
    1. Make sure Discord is open
    2. Go to Touch Portal Settings
    3. Click Plug-ins
    4. Select Touch Portal Discord Plugin in the dropdown
    5. Click Stop button
    6. Click Start Button
    7. Reauthorize the Plugin
  2. The server list blanked out
    1. delete the action and readd it
    2. if that doesn't work stop and start the plugin as notated above
  3. The channel list blanked out
    1. Change the server dropdown to a different server, and back again to the server you want

Actions

Discord Actions

Discord Mute:

Sample Mute Button
Discord Mute

Discord Deafen:

Sample Deafen Button
Discord Deafen

Discord Go To Channel

Discord Go To Channel

Discord Voice Type

Discord Voice Type

Discord Voice Hangup

Discord Voice Hangup

Discord Push To Talk Keys

NOTE: This DOES NOT press them, it sets them as the push to talk keys inside discord
Discord PTT Keys

States

Discord States

Sample Page

Sample Page Download
Has a sample button for all actions, and states to display info

Cleanup pre-v4.0.0 config

  1. After importing v4.0.0 plugin
  2. On Windows
    1. Go to %APPDATA%\TouchPortal\plugins
  3. On Mac
    1. Go to /Users/<Your User Name>/Documents/TouchPortal/plugins
  4. Delete the config folder (this was only used by this plugin)

Dependencies

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the GPL 3.0 License - see the LICENSE file for details

Bugs/Enhancements

Use the Github Issues tab to report any bugs/enhancements for this plug-in. Or mention them in the Official Touch Portal discord channel #discord

Acknowledgements

  1. Thank you to Reinier and Ty the Touch Portal Creators
  2. Thank you to all the users of the Discord Plugin
  3. Thank you to 50 Shades of Skittles for Testing
  4. Thank you Discord for not shutting down the RPC API

touchportal_discord_plugin's People

Contributors

spdermn02 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.