Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep Cache #1109

Closed
3 tasks done
ghost opened this issue Mar 23, 2024 · 2 comments
Closed
3 tasks done

Sweep Cache #1109

ghost opened this issue Mar 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Mar 23, 2024

Which package has the bugs?

The core library

Issue description

Install discord.js selfbot package and run i guess.

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

3.1.4

Node.js version

18

Operating system

Window 10

Priority this issue should have

High (immediate attention needed)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

The caching is a problem in this library, sweeper options does even work at all? It doesn't have a direct reference in the API, and it's ridiculous how it just defaultly cache everything non stop which leads to memory usage to sky rocket over a short period of time. How do i sweep everything? Not the docs or even discord.js docs have a wide variety of options to sweep other than messages and users but it seems i've done some digging and there is more options to it. So whats the approach i should take? Please let me know if the sweeper is operational in the library and how do i enable it for all types of cache not just messages and users.

@ghost ghost added the bug Something isn't working label Mar 23, 2024
@aiko-chan-ai
Copy link
Owner

Please let me know if the sweeper is operational in the library and how do i enable it for all types of cache not just messages and users.

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

@ghost
Copy link
Author

ghost commented Mar 28, 2024

Thank you yes it works i guess.

@ghost ghost closed this as completed Mar 28, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant