Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devsnek/discord-rich-presence
Discord RPC but only the rich presence part
https://github.com/devsnek/discord-rich-presence
discord rich-presence
Last synced: about 2 months ago
JSON representation
Discord RPC but only the rich presence part
- Host: GitHub
- URL: https://github.com/devsnek/discord-rich-presence
- Owner: devsnek
- Created: 2017-12-08T23:38:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-29T12:10:51.000Z (over 3 years ago)
- Last Synced: 2024-10-25T04:12:29.483Z (about 2 months ago)
- Topics: discord, rich-presence
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 121
- Watchers: 7
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Discord Rich Presence
A simple wrapper around [discord-rpc](https://npmjs.org/discord-rpc)
### Example
```javascript
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.