// ignore this const RPC = require("discord-rpc") const client = new RPC.Client({ transport: 'ipc' }); const creds = { clientId: '768515662036729887', clientSecret: '[REDACTED]' } client.login({ clientId: creds.clientId }).then(async () => { console.log(client.user); // Subscribe to events ['ACTIVITY_JOIN', 'ACTIVITY_JOIN_REQUEST'].forEach(evt => client.subscribe(evt, (data) => { console.log(`Received ${evt}`); console.log(data); })); // Set the user's presence await client.setActivity({ state: "state", details: "details", startTimestamp: Date.now(), endTimestamp: Date.now() + (60 * 5 + 23), partyId: 'asdf-ghjk-uztrew-asdfvgbh-trgf4e36r5t', partySize: 1, partyMax: 6, joinSecret: "025ed05c71f639de8bfaa0d679d7c94b2fdce12f", spectateSecret: "e7eb30d2ee025ed05c71ea495f770b76454ee4e0", matchSecret: "4b2fdce12f639de8bfa7e3591b71a0d679d7c93f", instance: true }); let lobby = await client.createLobby(2, 6); console.log(lobby); });