#JS heap size memory error

10 messages · Page 1 of 1 (latest)

sullen remnantBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
slender cloak
#

Why would you make a seperate bot just to send one message. This sounds like it would be way more efficient to be done with webhooks from one single client

slender cloak
#

That still doesn’t explain why you think it’s a good idea to have several different bot clients in the same process instead of using webhooks with one single REST instance to send them with

slender cloak
#

Webhooks are still your answer. And I didn’t hear any reason against it yet

slender cloak
#

Then at least explain to me why you want to build a different architecture than the one that would solve your issue

#

You can fetch with just rest though. What do you need a logged in gateway websocket for each of them for?

#

And I still don’t see why you can’t use one single client to do that all. Why do you even have several different bots/clients to begin with?

#

Do you listen to any gateway events on those clients?

slender cloak
#

You don’t need a full djs client for that then. A simple REST instance (possibly in combination with @discordjs/core) would be the better approach then. generally it is not advisable to have more than one client per process.

#

Just to send messages or fetch stuff you don’t need to login to the gateway