New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dc-rpc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dc-rpc

discord-rpc is a powerful library created by Discord, allowing developers to integrate Rich Presence functionality into their Discord applications smoothly.

latest
Source
npmnpm
Version
1.6.0
Version published
Weekly downloads
8
100%
Maintainers
1
Weekly downloads
 
Created
Source

node-current npm npm latest GitHub Repo stars Discord Discord Visitor Issues Commit Build Build

Discord RPC

  • discord-rpc is a powerful library created by Discord, allowing developers to integrate Rich Presence functionality into their Discord applications smoothly.

[!NOTE] This Discord RPC is a remake of the original discord-rpc created by Discord.js, also known as Discord.

Installation

npm install dc-rpc
pnpm install dc-rpc

Quick example

// Importing Discord-RPC
const { RpcClient } = require('dc-rpc');

// Create an instance of Discord-RPC
const client = new RpcClient();

// ================================================================

// 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

presence

License

This Project under MIT License
© 2019 - 2024 Strivo Development. All Rights Reserved

Keywords

discord-rpc

FAQs

Package last updated on 28 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts