🐛 Return after emitting error event (#218)
Displays an error and tries to play the music.
This commit is contained in:
parent
bddf518277
commit
9c56976da2
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ class Player extends EventEmitter {
|
||||||
_createQueue (message, track) {
|
_createQueue (message, track) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const channel = message.member.voice ? message.member.voice.channel : null
|
const channel = message.member.voice ? message.member.voice.channel : null
|
||||||
if (!channel) this.emit('error', 'NotConnected', message)
|
if (!channel) return this.emit('error', 'NotConnected', message)
|
||||||
const queue = new Queue(message.guild.id, message, this.filters)
|
const queue = new Queue(message.guild.id, message, this.filters)
|
||||||
this.queues.set(message.guild.id, queue)
|
this.queues.set(message.guild.id, queue)
|
||||||
channel.join().then((connection) => {
|
channel.join().then((connection) => {
|
||||||
|
|
Loading…
Reference in a new issue