electron-discord-register
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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 and Spectate features.

Equivalent to calling Discord_Register() or Discord_Initialize() with the autoRegister parameter using the Discord SDK.

Currently only supports Windows and macOS.

Install

npm install electron-discord-register

Usage

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

Readme

Keywords

Package Sidebar

Install

npm i electron-discord-register

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

4.43 kB

Total Files

5

Last publish

Collaborators

  • samuelmaddock