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

@corwinjs/rpcord

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corwinjs/rpcord

Module to interact with Discord IPC.

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
0
Created
Source

RPCord

NPM

Module to interact with local Discord Client using IPC.

Features

  • All RPC Commands supported.
  • Simple interface.
  • Made with TypeScript.

Docs

Read the docs here.

Installation

You can install from NPM.

npm i rpcord

Example

const { RPClient, Presence } = require("rpcord");

const rpc = new RPClient("803507787497865226");

rpc.on("ready", () => {
  console.log("Connected!");
});

rpc.connect().then(() => {
  rpc.setActivity(
    new Presence()
      .setLargeImage("discord")
      .setDetails("Nothing")
      .setState("Idling")
      .setStartTimestamp(Date.now())
      .setPartyID("12345")
      .setPartySize(1, 2)
      .addButton({
        label: "RPCord Repo",
        url: "https://github.com/DjDeveloperr/RPCord",
      })
      .addButton({
        label: "RPCord NPM",
        url: "https://npmjs.org/package/rpcord",
      })
  );
});

Or an advanced one!

const { RPClient } = require("rpcord");

const rpc = new RPClient("client_id", {
  secret: "client_secret",
  scopes: ["rpc", "messages.read"],
});

rpc.on("ready", () => {
  console.log("Connected!");
});

rpc.on("messageCreate", console.log);

rpc.connect().then(() => {
  rpc.authorize().then(() => {
    rpc.subscribe("MESSAGE_CREATE", { channel_id: "channel_id" });
  });
});

Note

For now, OAuth only works if you have at least one Redirect URI set in Developer Portal.

Contributing

You're always welcome to contribute!

License

Check LICENSE for more info.

Copyright 2021 @ DjDeveloperr

FAQs

Package last updated on 18 Mar 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