Emitter Not Firing
I'm currently using the
voiceStateUpdate
event emitter, and I believe I've come across a problem.
When a user leaves the voice channel, a new state (event) gets emitted. However, when a user leaves the voice channel while streaming, a new state (event) does not get emitted.
Just to clarify, it seems to be registering starting a stream and ending a stream fine. Just the problem above ^^
Is this a problem with the discord api, discord.js or possibly even my code?33 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Post the full error stack trace, not just the top part!
- Show your code!
- Explain what exactly your issue is.
- Not a discord.js issue? Check out #useful-servers.
- Issue solved? Press the button!Are you positive that the member is cached before leaving?
If not you may need the guildmember partial.
How can I check this?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Still doesn't seem to be firing, here is my code just in case:
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
There's a bunch of stuff in-between but I made sure to test the firing outside of any interfering code blocks.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
In all honesty this was a template, but yes it does seem to be exporting the client.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
That is already present
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
The handler didn't include a
voiceStateUpdate
event, and tbh I wasn't 100% sure how to adapt it
I'll take a look now, and see if I can get it to workUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
Sure
It's in a few files, would you like to see them all?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Mhm
Ah so I just use
voiceStateUpdate
?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah right I see
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Uh, where can I check this? I'm not 100% sure
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I think it should be this:
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Client (extends BaseClient)
The main hub for interacting with the Discord API, and the starting point for any bot.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yep, seems to be working now.
Thank you very much, you're a life saver.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
🙏