a fork of discordjs/RPC
npm install @kostya-main/discord-rpc
@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.
ts
import { Client } from "@kostya-main/discord-rpc";
const client = new Client({
clientId: "123456789012345678"
});
client.on("ready", () => {
client.user?.setActivity({
state: "Hello, world!"
});
});
client.login();
``