GatewayIntentBits.GuildMessages problem

I have a problem with the GatewayIntentBits.GuildMessages intention on my bot. For a week now, this intention has been using a lot of resources on my server for my bot. Basically, my bot always uses ≈150MB of memory, but memory usage is increasing and not stagnating: my bot has been active for 9 hours and is using 1GB of memory. And when I deactivate it, everything goes back to normal. If you have any answers to my questions
9 Replies
d.js toolkit
d.js toolkit10mo 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!
AlexxP62
AlexxP6210mo ago
ah But before, it didn't do what I wrote. Do you have a way to solve the problem please this week Well, I've always had this intention activated on my bot, everything was normal, the memory used was stable at around 150MB, and for the past week, because of this intention, memory use has been enormous and keeps increasing. I removed it from my bot. I waited one night and memory usage was normal. i dont know it have 371 guilds but for a week i have this problem Nothing
grass
grass10mo ago
how large is your bot? messages just loaded
AlexxP62
AlexxP6210mo ago
370 guilds and 200000 users oh Will this problem correct itself?
TomG
TomG10mo ago
probably you need to clean the cache of you bot idk how
AlexxP62
AlexxP6210mo ago
ah
TomG
TomG10mo ago
i have that question too
AlexxP62
AlexxP6210mo ago
So you can guess that this is a real problem for me.
souji
souji10mo ago
naturally, if it doesn't receive messages it cannot cache them, so of course that will lighten the memory load caches are always convenient, but can make your memory footprint much worse, that's to be expected, that's the general trade-off when using caches vs. requesting information as necessary (both in information and database theory) if you don't need 200 per channel, you can look into sweepers and custom cache limits (client settings)