Closed ghost closed 7 years ago
following up: looking for any dependencies on specific modules (superagent, etc) dunno what the replacements are for these picky modules but I may just remove them personally as I don't use the commands that the module is meant to be used for.
There is an ongoing project to limit the number of dependencies and move a lot of the commands that many people wont use into separate projects as plugins.
That being said, you should get your terms straight, @Hakase-professor. A project with a lot of dependencies isnt a "mem leak". In any sense of the term. Thanks for your eloquent input though.
follow up 2: found around ~4 deps who depend on superagent also around 4 use request.
And on another note, this is actually quite light on memory usage. I don't really know where you're getting your information. If you have some specific CPU/RAM numbers that you'd like to share with us, that's fine, but claiming this is "bloatware" is quite untrue.
I have around ~65 guilds and the bot uses around 430MB according to pm2
The problem is not guilds itself, but the number of users.
Ah, well is it just a fault in the way that d.js handles users?
Where else is it going to store them other than in-memory?
Discord.js caches users: https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=users
~I think whenever a user is demanded for whatever reason, lets say a message is captured, and it was sent by someone, so that user is loaded and gets inserted into the cache. I wonder if theres a way to configure Discord.js to not cache users, in which case all user fetching would have to be done asynchronously by Client#fetchUser
instead of Client.users#get
.~
Also related to what I mentioned: https://github.com/hydrabolt/discord.js/issues/1409
You can only use Client#fetchUser
on a bot account.
Good point. RIP
By the way, this should probably be marked as "discussion"
yea users caching has nothing to do with this. I have made my own selfbot that has over 200k users and it uses less than 30MB
unless this selfbot that is bloatware somehow stores and uses them for something
We don't cache anything ourselves. The bot is not bloatware. None of the manager systems use any noticeable amount of RAM if any. This is not bloatware. Feel free to go find someone else's software to needlessly insult.
Again, if you are having a legitimate problem and have some real information to share, we might be able to help.
I have one last comment to make, and then I'm closing this issue for good (unless someone else has anything useful to say).
You claim that you have a selfbot running in 200k users and that it uses less than 30MB? That simply isn't possible unless those servers are massively inactive, which would lead to almost nothing being cached. Another possibility is that you're clearing the caches. Discord.js caches things, and it does use RAM. If you had 200k users and they were all active, your bot would be using obscene amounts of memory.
This bot is not a memory leak. This bot is doing nothing malicious. Inspect the code yourself, if you want.
kthxbai
if you really want to keep this you better use only 1 module snekfetch and make all requests yourself and as this is bloatware that takes memory and i hate this each user i see using selfbot is 99% sharpbot