Control
Control playback and Discord, send notifications, open files and URLs, and manage system power state.
Media control
Section titled “Media control”Send the MEDIA_CONTROL event with an action to control media playback.
Available actions:
PLAYPAUSESTOPNEXTPREVIOUSVOLUME_UPVOLUME_DOWNMUTE
{ "id": "abc123", "token": "abc123", "event": "MEDIA_CONTROL", "data": { "action": "PAUSE" }}Discord control
Section titled “Discord control”Send the DISCORD_CONTROL event with an action to join or leave voice channels, open a text channel, or change your Discord voice settings. Discord must be set up first.
Available actions:
JOIN_VOICE_CHANNEL: setchannel_idto a voice channel’s ID. If you’re already in a voice channel, this moves you.LEAVE_VOICE_CHANNELOPEN_TEXT_CHANNEL: setchannel_idto a text channel’s ID to show it in Discord. Discord refuses forum channels.MUTE,UNMUTE,TOGGLE_MUTEDEAFEN,UNDEAFEN,TOGGLE_DEAFENSET_INPUT_VOLUME: setvalueto 0-100.SET_INPUT_DEVICE: setdevice_idto a deviceidfrominput.devicesin thediscorddata.SET_OUTPUT_VOLUME: setvalueto 0-200.SET_OUTPUT_DEVICE: setdevice_idto a deviceidfromoutput.devices.SET_VOICE_MODE: setmodetoVOICE_ACTIVITYorPUSH_TO_TALK.SET_VOICE_THRESHOLD: setvalueto the voice activity sensitivity, -100 to 0 dB.SET_PUSH_TO_TALK_DELAY: setvalueto the push to talk release delay, 0-2000 milliseconds.ENABLE_QOS,DISABLE_QOS,TOGGLE_QOSENABLE_SILENCE_WARNING,DISABLE_SILENCE_WARNING,TOGGLE_SILENCE_WARNING
The volume values are the percentages that Discord’s sliders show. In testing, Discord ignored changes to automatic sensitivity, noise suppression, echo cancellation and automatic gain control made over RPC, so those settings are only available as data.
{ "id": "abc123", "token": "abc123", "event": "DISCORD_CONTROL", "data": { "action": "SET_INPUT_VOLUME", "value": 80 }}The response type is DISCORD_CONTROLLED. If Discord is not connected, the response is an ERROR.
Send notification
Section titled “Send notification”Send the NOTIFICATION event to show a desktop notification. title and message are required; the rest are optional.
{ "id": "abc123", "token": "abc123", "event": "NOTIFICATION", "data": { "title": "Hello", "message": "World" }}Available fields:
title(required): The notification title.message(required): The notification body.icon(optional): The icon name.duration(optional): How long to show the notification, in milliseconds.actionUrl(optional): A URL to open when the notification is clicked.actionPath(optional): A file or folder path to open when the notification is clicked.sound(optional): Path to a sound file to play with the notification.
Open a path
Section titled “Open a path”Send the OPEN event with a path to open a file or folder with the default application.
{ "id": "abc123", "token": "abc123", "event": "OPEN", "data": { "path": "C:\\users\\user\\Downloads\\example.txt" }}Open a URL
Section titled “Open a URL”Send the OPEN event with a url to open it in the default browser.
{ "id": "abc123", "token": "abc123", "event": "OPEN", "data": { "url": "https://timmo.dev" }}Power control
Section titled “Power control”Control the system power state with one of the following events. Each takes empty data.
POWER_HIBERNATEPOWER_LOCKPOWER_LOGOUTPOWER_RESTARTPOWER_SHUTDOWNPOWER_SLEEP
{ "id": "abc123", "token": "abc123", "event": "POWER_SLEEP", "data": {}}