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

fix voiceChannelLeave event on no cache #132

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

urbainn
Copy link
Contributor

@urbainn urbainn commented Feb 23, 2024

hello,

when caching is disabled, the voiceChannelLeave event does not emit at all. that's because the event is only emitted if the cached value oldChannel is defined. instead, I propose to directly check if the state.channelID is null, so the event doesn't have to depend on whether the old voice state and the old channel are cached.

when the old channel is not cached, it will pass null as the value for the oldChannel event parameter, so I updated its type accordingly

thanks

@DonovanDMC DonovanDMC merged commit f216504 into OceanicJS:dev Mar 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants