1.2.1 • Published 12 months ago
@kostya-main/discord-rpc v1.2.1
About
@kostya-main/discord-rpc is a fork of discordjs/RPC with type safety and some additional features. The difference from xhayper/discord-rpc is that ws{https://www.npmjs.com/package/ws} does not use the native modules utf-8-validate and bufferutil.
Example
import { Client } from "@kostya-main/discord-rpc";
const client = new Client({
clientId: "123456789012345678"
});
client.on("ready", () => {
client.user?.setActivity({
state: "Hello, world!"
});
});
client.login();Compatibility
| OS | Normal | snap | flatpak |
|---|---|---|---|
| Windows | Y | - | - |
| macOS | Y | - | - |
| Linux | Y | Y | Y |
- Linux is tested on Kubuntu 22.04
Credits
- discordjs: Making discordjs/RPC
- JakeMakesStuff: snap support
- Snazzah: snap + flatpak support
- leonardssh: Making coc-discord-rpc which inspried me to make this package due to how old discordjs/RPC is