Whenever I try to run my discord.js bot, my code editor says that it couldn't connect to discord via discord RPC. I've looked around and saw nothing that can help me. Can anyone help?
Whenever I try to run my discord.js bot, my code editor says that it couldn't connect to discord via discord RPC. I've looked around and saw nothing that can help me. Can anyone help?
Share Improve this question asked Mar 17, 2018 at 20:01 Pruina TempestatisPruina Tempestatis 3943 gold badges7 silver badges17 bronze badges 3- 1 Never mind, it suddenly works now. My bot runs now. – Pruina Tempestatis Commented Mar 17, 2018 at 20:16
- 1 Discord had an outage. – André Commented Mar 17, 2018 at 20:20
- 1 Explains why other bots were slow. – Pruina Tempestatis Commented Mar 17, 2018 at 20:22
2 Answers
Reset to default 2Discord just had an outage.
You can follow up Discord Updates here.
If you wanna read why Discord was offline just now, here is the direct link, or here:
Monitoring
We've addressed the underlying issue and services are recovering. Everybody should be able to reconnect and use Discord normally, but some operations may be a little slow as the system fully recovers. The team is keeping an eye on things.
Posted less than a minute ago. Mar 17, 2018 - 13:12 PDTIdentified
We've identified that a MongoDB database is performing badly. We're taking steps to reduce load against the cluster now.
Posted 21 minutes ago. Mar 17, 2018 - 12:51 PDTInvestigating
We've bee aware of an issue affecting connecting to Discord. We're looking into it now and will update as soon as we know more.
Posted 38 minutes ago. Mar 17, 2018 - 12:34 PDT
Just ran across this issue now. If you are using discord-rich-presence, you can edit ipc.js under discord-rpc/src/transports
in node-modules. Discord rich presence also installs discord-rpc with it.
The problem is that the package is throwing an error whenever you cannot connect. On line 32, inside of the else statement, there is this code.
else {reject(new Error('Could not connect'));}
As you can see, it is throwing an error when the connection is invalid. For some reason, a try, catch does not fix this. The best thing to do in this case would be to delete -
reject(new Error('Could not connect'));
After doing this, you can either log something inside of that else statement, or just leave it blank.This package is a very simple alternative to discord-rpc
, but it has been inactive for a while now. So I doubt they will merge any new pull requests. Should work now ( :