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
- Host: GitHub
- URL: https://github.com/acerolaorionheart1/discord-presence
- Owner: acerolaorionheart1
- Created: 2022-07-13T10:34:20.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-13T10:51:08.000Z (almost 3 years ago)
- Last Synced: 2025-01-31T08:35:37.054Z (3 months ago)
- Topics: discord-presence, discord-rpc, discord-rpc-js, discord-rpc-status
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 .
```