Skip to content

Commit

Permalink
fix: playingPlayers going below zero
Browse files Browse the repository at this point in the history
This commit fixes the bug that caused deflation of playing players value.
  • Loading branch information
ThePedroo committed May 6, 2024
1 parent fdb5dd6 commit 5e26288
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/connection/voiceHandler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { debugLog, waitForEvent } from '../utils.js'
import config from '../../config.js'
import constants from '../../constants.js'
import sources from '../sources.js'
import Filters from '../filters.js'

Expand All @@ -12,7 +11,7 @@ import discordVoice from '@performanc/voice'

globalThis.nodelinkPlayersCount = 0
globalThis.nodelinkPlayingPlayersCount = 0

class VoiceConnection {
constructor(guildId, client) {
nodelinkPlayersCount++
Expand Down Expand Up @@ -107,8 +106,6 @@ class VoiceConnection {

this.connection.on('error', (error) => {
if (!this.config.track) return;

if (!this.config.paused) nodelinkPlayingPlayersCount--

debugLog('trackException', 2, { track: this.config.track.info, exception: error.message })

Expand Down

0 comments on commit 5e26288

Please sign in to comment.