3 releases
new 0.1.2 | Jan 28, 2025 |
---|---|
0.1.1 | Jan 27, 2025 |
0.1.0 | Jan 26, 2025 |
#10 in #discord-rich-presence
146 downloads per month
11KB
119 lines
Tauri Plugin DRPC
A plugin for Tauri that allows you to control Discord Rich Presence.
Installation
You can download plugin from crates.io
cd src-tauri
cargo add tauri-plugin-drpc
npm i tauri-plugin-drpc
Usage example
import { setActivity } from "tauri-plugin-drpc";
import { Activity, Assets } from "tauri-plugin-drpc/activity";
const applicationClientId = "APP_ID_HERE";
const assets = new Assets()
.setLargeImage("IMAGE_ID")
.setLargeText("Large Image Text");
const activity = new Activity()
.setDetails("First line")
.setState("Second line")
.setAssets(assets);
(async () => {
await setActivity(activity);
// Spawn a discord rich presence thread
await start(applicationClientId);
})();
Dependencies
~17–58MB
~852K SLoC