https://github.com/strivo-dev/discord-rpc
discord-rpc is a powerful library created by Discord, allowing developers to integrate Rich Presence functionality into their Discord applications smoothly.
https://github.com/strivo-dev/discord-rpc
dc-rpc discord discord-rpc rpc
Last synced: about 1 month ago
JSON representation
discord-rpc is a powerful library created by Discord, allowing developers to integrate Rich Presence functionality into their Discord applications smoothly.
- Host: GitHub
- URL: https://github.com/strivo-dev/discord-rpc
- Owner: strivo-dev
- License: mit
- Created: 2023-04-07T02:47:03.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-29T14:40:44.000Z (4 months ago)
- Last Synced: 2025-11-30T20:37:58.702Z (4 months ago)
- Topics: dc-rpc, discord, discord-rpc, rpc
- Language: JavaScript
- Homepage:
- Size: 362 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/codeowners
Awesome Lists containing this project
README
# Discord RPC
- **[Discord-RPC] is a powerful library developed by SITCommunity that enables developers to seamlessly integrate Rich Presence functionality into Discord applications or from Client ID**
## Install
- NPM
```
npm i dc-rpc
```
## Quick example
```js
// Importing Discord-RPC
const { RpcClient } = require('dc-rpc');
// Create an instance of Discord-RPC
const client = new RpcClient(); // removed websocket
// ================================================================
// Your Applications Client ID
const Id = 'client_id';
// Login To Discord RPC
await client.login({ clientId: Id });
// ================================================================
// Function When Client Is Ready
client.on('ready', () => {
console.log('Authed for user:', client.user.username); // Console Output: Authed for user: [discord_username]
// Set Activity (Example)
client.setActivity({
state: 'it work!!!',
details: 'Testing RPC',
largeImageKey: 'icon_name', // From Discord Applications Rich Presence Assets
largeImageText: 'this is icon',
startTimestamp: Date.now(),
});
});
// ================================================================
// Destroying Or Disconnecting From RPC
client.destroy();
```
## Example Results

## License
```
This Project under MIT License
© 2019 - 2024 SITCommunity. All Rights Reserved
```
## Credits
- Original: [Senophyx]
- Maintainer: [brokenedtz]
[Discord-RPC]: https://www.npmjs.com/package/dc-rpc
[Senophyx]: https://github.com/Senophyx
[brokenedtz]: https://github.com/brokenedtzjs
