the rpc in discordjs uses [email protected] seems to be installing forever

the rpc in discordjs uses [email protected] which seems to be installing forever
21 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
duck
duck13mo ago
not really sure what you mean assuming you're referring to discord-rpc, it doesn't depend on electron nor anything that depends on electron either way this also wouldn't be an issue with discord-rpc itself, nor something we would be able to help with
decodedcoder
decodedcoderOP13mo ago
GitHub
GitHub - discordjs/RPC: A simple RPC client for Discord
A simple RPC client for Discord. Contribute to discordjs/RPC development by creating an account on GitHub.
duck
duck13mo ago
is it that you're installing from github directly for whatever reason?
decodedcoder
decodedcoderOP13mo ago
wdym installing from github ? The whole thing in the project depends on Electron or am i wrong
duck
duck13mo ago
it doesn't, no electron appears to be used in the example this is why it's only listed as a dev dependency when installing discord-rpc, it won't be using electron on its own you are free to use electron as you please
decodedcoder
decodedcoderOP13mo ago
That appears to be the only example is it possible to be used without electron
duck
duck13mo ago
yes, the example only uses electron to produce this it's not used in the actual rpc client the readme shows a minimal example that doesn't use electron
No description
decodedcoder
decodedcoderOP13mo ago
thye minimal example do you mean the "### Browser Example" section in the readme ?
duck
duck13mo ago
yes
decodedcoder
decodedcoderOP13mo ago
but which file to run in this case ?
duck
duck13mo ago
I'm not exactly sure what you're asking discord-rpc is a package for you to use in your code what file you run is entirely up to you
decodedcoder
decodedcoderOP13mo ago
so the github project is not needed if im not going to use electron
duck
duck13mo ago
it's the source from which the package is published you wouldn't be installing from github none of this has anything to do with whether or not you're using electron
decodedcoder
decodedcoderOP13mo ago
so its should be used via npm
decodedcoder
decodedcoderOP13mo ago
npm
discord-rpc
A simple RPC client for Discord. Latest version: 4.0.1, last published: 2 years ago. Start using discord-rpc in your project by running npm i discord-rpc. There are 68 other projects in the npm registry using discord-rpc.
decodedcoder
decodedcoderOP13mo ago
?
duck
duck13mo ago
sure, or whatever package manager you prefer
decodedcoder
decodedcoderOP13mo ago
const clientId = '287406016902594560';
const scopes = ['rpc', 'rpc.api', 'messages.read'];

const client = new RPC.Client({ transport: 'websocket' });

client.on('ready', () => {
console.log('Logged in as', client.application.name);
console.log('Authed for user', client.user.username);

client.selectVoiceChannel('81384788862181376');
});

// Log in to RPC with client id
client.login({ clientId, scopes });
const clientId = '287406016902594560';
const scopes = ['rpc', 'rpc.api', 'messages.read'];

const client = new RPC.Client({ transport: 'websocket' });

client.on('ready', () => {
console.log('Logged in as', client.application.name);
console.log('Authed for user', client.user.username);

client.selectVoiceChannel('81384788862181376');
});

// Log in to RPC with client id
client.login({ clientId, scopes });
okay i installed through npm Wouldn't RPC now be undefined because there is no import for the package ?
duck
duck13mo ago
I suppose you're right, it's not a 100% complete example, but it's fairly unmaintained atm, so I'm not sure if the example will be updated this is however something that you should know how to do
decodedcoder
decodedcoderOP13mo ago
I mean i might be able to figured it out, until then i will post a message here
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6463
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6463
any idea about this error ? does this code run on the browser or node ? I'm so confused in the readme it says browser example
Want results from more Discord servers?
Add your server