JSPM

discord-rich-presence

0.0.8
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 561
  • Score
    100M100P100Q100924F
  • License MIT

rich presence wrapper for discord-rpc

Package Exports

  • discord-rich-presence

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discord-rich-presence) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


Discord server NPM version NPM downloads Dependencies Patreon

NPM info

Discord Rich Presence

A simple wrapper around discord-rpc

Example

const client = require('discord-rich-presence')('180984871685062656');

client.updatePresence({
  state: 'slithering',
  details: '🐍',
  startTimestamp: Date.now(),
  endTimestamp: Date.now() + 1337,
  largeImageKey: 'snek_large',
  smallImageKey: 'snek_small',
  instance: true,
});

In browser you can import/require it as discord-rich-presence/browser. However, it should be noted that currently using rich presence in browser is a feature whitelisted by Discord, and you will most likely be unable to use it.