Fixed panic on song download fail
This commit is contained in:
parent
f6c86f8566
commit
83f35f2484
3
main.go
3
main.go
|
@ -96,7 +96,8 @@ func (dj *mumbledj) OnSongFinished() {
|
||||||
if err := dj.currentSong.Download(); err == nil {
|
if err := dj.currentSong.Download(); err == nil {
|
||||||
dj.currentSong.Play()
|
dj.currentSong.Play()
|
||||||
} else {
|
} else {
|
||||||
panic(err)
|
user.Send(AUDIO_FAIL_MSG)
|
||||||
|
dj.currentSong.Delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue