1.0.0 • Published 6 years ago

electron-discord-register v1.0.0

Weekly downloads
18
License
MIT
Repository
github
Last release
6 years ago

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