# electron-discord-register

> Register an application protocol to launch your Electron app with Discord.

Latest version **1.0.0** (published 2018-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install electron-discord-register
pnpm add electron-discord-register
yarn add electron-discord-register
bun add electron-discord-register
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-10-24 |
| First published | 2018-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Samuel Maddock |
| Maintainers | samuelmaddock |
| Keywords | electron, discord, sdk |

## Links

- npm: https://www.npmjs.com/package/electron-discord-register
- Repository: https://github.com/samuelmaddock/electron-discord-register
- Homepage: https://github.com/samuelmaddock/electron-discord-register#readme
- Issues: https://github.com/samuelmaddock/electron-discord-register/issues
- npm.io page: https://npm.io/package/electron-discord-register

## Dependencies (2)

- [winreg](https://npm.io/package/winreg.md) ^1.2.4
- [electron](https://npm.io/package/electron.md) >=1.7.16

## Recent versions

- 1.0.0 (latest) — 2018-10-24

## README

# electron-discord-register
Register an application protocol to launch your Electron app with Discord—without native modules.

This module can be used to add support for Discord's Rich Presence [Ask to Join](https://discordapp.com/developers/docs/rich-presence/how-to#ask-to-join) and [Spectate](https://discordapp.com/developers/docs/rich-presence/how-to#spectating) features.

Equivalent to calling `Discord_Register()` or `Discord_Initialize()` with the `autoRegister` parameter using the [Discord SDK](https://discordapp.com/developers/docs/rich-presence/how-to#initialization).

_Currently only supports **Windows** and **macOS**._

## Install
```
npm install electron-discord-register
```

## Usage
```js
// CommonJS
const discordRegister = require('electron-discord-register')

// ES module
import discordRegister from 'electron-discord-register'

// Use your Discord application ID
const DISCORD_APP_ID = '418562325121990661'

// Call on application startup in main or renderer process
discordRegister(DISCORD_APP_ID)
```

## License
MIT

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