jagrosh / MusicBot

🎶 A Discord music bot that's easy to set up and run yourself!
https://jmusicbot.com
Apache License 2.0
5.22k stars 2.51k forks source link

[Bug Report] Bot stays in voice channel when playback fails #690

Closed RasmusAntons closed 3 years ago

RasmusAntons commented 3 years ago

Describe the bug When playing a song fails because no search query is provided or no results are found, the bot stays in the voice channel without playing music, even with StayInChannel set to false.

To Reproduce Steps to reproduce the behavior:

  1. Execute !play without a search query or something like !play uylicuytb while in a voice channel and the bot not playing music already.

Expected behavior Either the bot does not enter the voice channel at all or it disconnects immediately after the error message is sent.

Debug Info

System Properties:
  java.version = 1.8.0_212
  java.vm.name = OpenJDK 64-Bit Server VM
  java.vm.specification.version = 1.8
  java.runtime.name = OpenJDK Runtime Environment
  java.runtime.version = 1.8.0_212-8u212-b03-2~deb9u1-b03
  java.specification.version = 1.8
  os.arch = amd64
  os.name = Linux

JMusicBot Information:
  Version = Snapshot
  Owner = 177438227563675648
  Prefix = !
  AltPrefix = null
  MaxSeconds = 0
  NPImages = false
  SongInStatus = true
  StayInChannel = false
  UseEval = false
  UpdateAlerts = false

Dependency Information:
  JDA Version = 4.2.1_253
  JDA-Utilities Version = 3.0.5
  Lavaplayer Version = 1.3.75

Runtime Information:
  Total Memory = 308
  Used Memory = 74

Discord Information:
  ID = 778414066901188629
  Guilds = 2
  Users = 2
jagrosh commented 3 years ago

While this isn't necessarily intentional behavior, this and any other problems related to staying in a channel for too long can already be resolved by setting the alonetimeuntilstop value in the config file