Skip to content

discord

The community/apps/discord directory contains files that implement support for controlling the Discord application with Talon.

The core logic is split across multiple files:

  • discord.py: This file defines the Talon module for Discord, including the application definition and a list of possible destinations when using quick switcher. It also declares the actions used to control Discord, without implementing the specific key presses.
  • discord.talon: This file contains the Talon commands that users will say to control Discord. These commands map to the actions defined in discord.py. The commands use the user.discord_destination list to specify the type of destination when using quick switcher.
  • discord_win.py: This file implements the actions for the Windows and Linux operating systems by specifying the necessary key presses to perform the actions defined in discord.py.
  • discord_mac.py: This file implements the actions for the macOS operating system by specifying the necessary key presses to perform the actions defined in discord.py.

These files work together to provide a cross-platform way to control Discord with Talon. The discord.py file defines the module, actions, and application definition. The discord.talon file binds user voice commands to those actions. The platform-specific python files implement the actions by simulating key presses.