Skip to content

Bot throws unhandled exception when no music queued #1

@tabloomoo

Description

@tabloomoo

No music queued error should be handled. Bot should just wait about 20 seconds and then leave the voice call. Maybe how long the bot waits before leaving can be configurable.

usr/app/src/services/player.ts:410

      throw new Error('No songs in queue to forward to.');

            ^



Error: No songs in queue to forward to.

    at default.manualForward (/usr/app/src/services/player.ts:410:13)

    at default.forward (/usr/app/src/services/player.ts:315:10)

    at default.onAudioPlayerIdle (/usr/app/src/services/player.ts:783:18)

    at AudioPlayer.emit (node:events:519:28)

    at AudioPlayer.set state (/usr/app/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:362:8)

    at AudioPlayer.checkPlayable (/usr/app/node_modules/@discordjs/voice/src/audio/AudioPlayer.ts:518:4)

    at <anonymous> (/usr/app/node_modules/@discordjs/voice/src/DataStore.ts:124:27)

    at Array.filter (<anonymous>)

    at audioCycleStep (/usr/app/node_modules/@discordjs/voice/src/DataStore.ts:124:27)

    at Timeout.<anonymous> (/usr/app/node_modules/@discordjs/voice/src/DataStore.ts:142:3)


Node.js v22.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions