#Memory Leak

15 messages · Page 1 of 1 (latest)

raven thornBOT
#
  • 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!
south surge
#

What intents does your bot have? And does it have custom cache settings or sweepers?

tardy trellis
#
const client = new Client({
    intents: [Guilds, MessageContent, GuildMessages, GuildMembers],
});

and i dont have any costum cache settings or sweepers im even not using a single global variable it is just a small application

south surge
#

In how many guilds is that bot and how many members and channels do those have?

#

Because those intents will mostly cache 200 messages per text based channel and all members that your bot ever received in payloads

tardy trellis
#

its in 2 guilds and each has about 300 members / about 50 channel.

south surge
#

What else does it do? Any fetches from URLs, what additional packages beside djs do you have installed, …?

tardy trellis
#

wanna see the githubrepo?

south surge
#

That would be an easy approach yes

tardy trellis
#

develop branch

pulsar iron
#

Well thats a pretty big codebase

tardy trellis
#

its my first node project recent graduated but thx then for the help

south surge
#

Couple of things I noticed:

  • you don’t need neither GuildMessages, MessageContent nor GuildMembers intent for anything you do in your code afaict
  • for a ts bot code you sure got a lot of anynotLikeCat
  • you make two clients in your main file only to login with the second and not use the first one at all
  • you have two canvas packages installed but probably don’t use both