# discord-rpc-constructor

> Syntactic sugar for discord-rpc's activity

Latest version **1.0.2** (published 2018-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install discord-rpc-constructor
pnpm add discord-rpc-constructor
yarn add discord-rpc-constructor
bun add discord-rpc-constructor
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-07-16 |
| First published | 2017-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | lloti |
| Maintainers | lloti |
| Keywords | rpc, discord, rich, presence, discord-rpc, discord-rich-presence, rich-presence-client |

## Links

- npm: https://www.npmjs.com/package/discord-rpc-constructor
- Repository: https://github.com/lloti/discord-rpc-constructor
- Homepage: https://github.com/lloti/discord-rpc-constructor#readme
- Issues: https://github.com/lloti/discord-rpc-constructor/issues
- npm.io page: https://npm.io/package/discord-rpc-constructor

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-07-16
- 1.0.1 — 2018-07-16
- 1.0.0 — 2017-12-11

## README

# discord-rpc-constructor
This package is meant to be used with discord-rpc

### Installation
```
npm i -S discord-rpc discord-rpc-constructor
```

### Usage
```js
const { Client } = require('discord-rpc');
const Activity = require('discord-rpc-constructor');
const client = new Client({ transport: 'ipc' });

client.on('ready', () => {
  const activity = new Activity()
    .setDetails('🐍')
    .setState('slithering')
    .setTimestamps(new Date(), Math.floor(Date.now() / 1000) + 60)
    .setLargeImage('snek_large', 'supa snek')
    .setSmallImage('snek_small', 'smol snek')
    .setParty('snek_party', 1, 5)
    .setMatchSecret('slithers')
    .setJoinSecret('boop')
    .setSpectateSecret('sniff')
    .setInstance(true);
  client.setActivity(activity);
});

client.login('180984871685062656');
```

---
_Source: https://npm.io/package/discord-rpc-constructor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
