An open API service indexing awesome lists of open source software.

https://github.com/acerolaorionheart1/discord-presence


https://github.com/acerolaorionheart1/discord-presence

discord-presence discord-rpc discord-rpc-js discord-rpc-status

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Installation
```
npm i discord-rpc
```
## Example usage
~~~javascript
import {Client} from 'discord-rpc'
const client = new Client({transport: 'ipc' /*or 'websocket'*/});
client.on('ready', () => {
console.log('Logged');
client.request('SET_ACTIVITY', {
pid: process.pid,
activity: {
details: 'Hello, world!',
state: 'OOOOMAGAWD'
}
});
});
client.login({clientId: '837826840004395048'});
~~~
### Run
```
node .
node index.js
```
# Self hosting
- Install Node.js (https://nodejs.org/)
- Delete the file `.gitignore`
- Run that commands in your terminal:
```
npm i
```
```
node .
```