Skip to content

Commit

Permalink
Initial testing
Browse files Browse the repository at this point in the history
  • Loading branch information
makidoll committed Mar 13, 2019
1 parent 7564c75 commit 97dcc1a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
46 changes: 46 additions & 0 deletions nodejs/rich-presence/app.js
@@ -0,0 +1,46 @@
const clientId = "555501224045314068";

const DiscordRPC = require("discord-rpc");

DiscordRPC.register(clientId);
const client = new DiscordRPC.Client({
transport: "ipc",
scopes: ["rpc", "rpc.api", "messages.read"],
});

client.on("ready", ()=>{
// client.setActivity({
// details: "test number 1",
// state: 'test number 2',
// startTimestamp: 0,
// largeImageKey: 'icon',
// largeImageText: 'icon!',
// smallImageKey: 'icon',
// smallImageText: 'small icon!',
// instance: true,
// party: {
// id: "thespot",
// size: [1, 100]
// },
// secrets: {
// join: "thespot",
// },
// });
client.setActivity({
details: "hifi://thespot",
state: "2 people",

partyId: "thespot",

spectateSecret: "thespot-secret",

largeImageKey: "icon",
smallImageKey: "icon",

instance: true,
});

client.connect();
});

client.login({clientId}).catch(console.error);
Binary file added nodejs/rich-presence/icon.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions nodejs/rich-presence/package.json
@@ -0,0 +1,10 @@
{
"name": "hifi-rich-presence",
"main": "app.js",
"author": "Maki",
"license": "GPLv3",
"dependencies": {
"discord-rpc": "^3.0.1",
"ws": "^6.2.0"
}
}

0 comments on commit 97dcc1a

Please sign in to comment.