Closed sinjs closed 3 years ago
Following code
const RPC = require('discord-rpc'); const clientId = 'abc'; const clientSecret = 'def'; const scopes = ['rpc']; const client = new RPC.Client({ "transport": "websocket" }); const startTimestamp = new Date() client.on('ready', () => { console.log('Logged in as', client.application.name); console.log('Authed for user', client.user.username); client.setActivity({ details: "Test", state: "Test", startTimestamp, instance: false, }); }); client.login({ clientId, scopes, clientSecret });
Gives an error:
(node:10784) UnhandledPromiseRejectionWarning: Error: connection closed
I also tried changing the transport to IPC, I get the authorization screen on my discord client. When I click on authorize, this happens:
(node:15016) UnhandledPromiseRejectionWarning: Error: OAuth2 Error: invalid_request: Missing "redirect_uri" in request.
Can anyone help me?
actually I am dumb, I thought that was for discord client lol
Following code
Gives an error:
I also tried changing the transport to IPC, I get the authorization screen on my discord client. When I click on authorize, this happens:
Can anyone help me?