aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
751 stars 160 forks source link

Cache system / ram usage #1221

Open zrSadek opened 1 month ago

zrSadek commented 1 month ago

Which package has the bugs?

The core library

Issue description

Hi, i think the sweepers etc dont work bcs i always have a big ram usage on simple code if i let them run for many hours, i tried many thing like makecache options, sweepers etc (the code below is not mine i found it on an other issue)

Code sample

const { Client, Options } = require("discord.js-selfbot-v13");
const client = new Client({
  disableEveryone: true,
  sweepers: {
    ...Options.DefaultSweeperSettings,
    messages: {
      interval: 3_600, // Every hour.
      lifetime: 1_800, // Remove messages older than 30 minutes.
    },
  },
});

Package version

latest

Node.js version

18*

Operating system

W11

Priority this issue should have

High (immediate attention needed if possible)

Checklist

Additional Information

none

aiko-chan-ai commented 1 month ago

The core is the discord.js library, I didn't change anything about the cache system

TheDevYellowy commented 1 month ago

How large is big ram usage, node itself takes a fair amount of ram, about 50Mb for just running not adding variables and such on top of that.

zrSadek commented 1 month ago

around +50mb per hour

zrSadek commented 1 month ago

i missclicked on the close btn

AdamMady commented 1 month ago

I have this same issue it really seem to use more and more ram by time and I have no idea what's causing it.

002-sans commented 3 weeks ago

there's multiple reason of why your ram increase:

002-sans commented 3 weeks ago

Options.DefaultSweeperSettings -> Options.defaultSweeperSettings

zrSadek commented 3 weeks ago

oui ca jlai juste repris d'une autre issue qui a ce soucis mais jai quand meme le soucis et jai mm pas de setinterval ou d'event userupdate jcomprends pas

002-sans commented 3 weeks ago

vient sur discord: sl.js