Set your Discord Rich Presence from the command line or script!
Adapted from the send-presence program found in https://github.com/discordapp/discord-rpc/
This program can be used to set your Discord Rich Presence by inputting each Rich Presence attribute into stdin. It can be used as a simple, lightweight, cross-platform and cross-language shim between any program and Discord's Rich Presence API.
This repository was made specifically for use in vlc-discord-rpc, so if you are using this for your own purposes I would suggest forking. Things will change without notice on this repository.
NOTE: This documentation assumes that you have a basic understanding of how Discord Rich Presence works.
The program will prompt you through each of the attributes of a Rich Presence. Here is the order in which the data should be entered:
- APPLICATION ID (ONLY ONCE)
- Details
- State
- Large Image Key
- Small Image Key
- Start timestamp (0 for none)
- End timestamp (0 for none)
As soon as the end timestamp is entered, your rich presence is updated, and the input process begins again.
Leaving a prompt blank will reset the input loop, prompting for Details again. Leaving the Details prompt blank will clear the presence.
- Clone this repository:
git clone https://github.com/Pigpog/discord-rich-presence-cli.git
- Download and extract the latest release of Discord-RPC
- Copy the files from linux-dynamic/lib to /usr/lib, and the files from linux-dynamic/include to /usr/include
- Run the following commands from this project's root directory:
sudo ldconfig
cmake .
make
You should now have a binary file named "send-presence". Run it with ./send-presence
, and it should start asking you questions (see Usage).