dzlandis
dzlandis
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
RAM usage appears to be fluctuating, which I hadn't really seen before and is very promising. Previously RAM would just increase forever and that was that. Now I'm seeing it go up and then go down which is very very good.
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
So far so good. Of course, the memory still goes up a little as the bot is used and voice channels are joined, but it hasn't gone up so high to where the systemctl process has needed to crash restart yet. Will keep updated :) Real test will be if I can see the systemctl process staying alive for more than like a day. That will confirm to me that the issue has been resolved fully.
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
I've deployed changes to production, will report back about the results. Thanks again for all the help, I really really appreciate it :) And of course, lmk if you figure out that enterState stuff haha
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
Lmk if that doesn't make sense
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
That's why I theorized await enterState would fix the issue and make it play the first time since it would wait for the connection to happen.
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
And for whatever reason, it plays once the connection is already initialized
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
So the connection is already initialized
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
Because of the way joinVoiceChannel works, since the bot is already in the voice channel, it doesn't try to join again
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
So when I run the command, the bot joins the voice channel and tries to play
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
Fair enough lol
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
I'll just set it all to use res.body and scrap all that other hacky stuff 👍
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
And it returned true
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
I confirmed by doing:
const audio = Readable.fromWeb(res.body as ReadableStream<any>);
const resource = createAudioResource(audio);
player.once(AudioPlayerStatus.Idle, () => console.log(res.bodyUsed));
const audio = Readable.fromWeb(res.body as ReadableStream<any>);
const resource = createAudioResource(audio);
player.once(AudioPlayerStatus.Idle, () => console.log(res.bodyUsed));
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
It is getting consumed
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
Yeah, you are right
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
I suppose it's possible it may be getting consumed by the actual discord.js audio player stuff 🤔
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
As in, passing res.body into Readable.fromWeb()?
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
The question now is how to properly consume it.
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
So that was definitely the problem
179 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
General DJS Memory Leaks & Potential Voice Issues
If I don't consume it and just pass in the raw res.body, I don't get the error btw
179 replies