Skip to content

Commit ceaea24

Browse files
committed
fix(voice-on-demand): check old state when leaving
1 parent f25b530 commit ceaea24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/voiceOnDemand/voiceOnDemand.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const voiceOnDemand: BotModule = {
6464
const onDemandChannels = await cache.get('onDemandChannels', []);
6565

6666
const isLobbyChannel = lobbyIds.includes(newState.channelId ?? '');
67-
const isOnDemandChannel = onDemandChannels.includes(newState.channelId ?? '');
67+
const isOnDemandChannel = onDemandChannels.includes(oldState.channelId ?? '');
6868

6969
if (!isOnDemandChannel && !isLobbyChannel) {
7070
return;

0 commit comments

Comments
 (0)