diff --git a/CHANGELOG.md b/CHANGELOG.md index 64200a6..3679780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - bug on `AnilistApiCommands` where the `RichCharacterInfo` uses a nonexistent function of the `ExtendedRichEmbed` - bug on`AnilistApi` where the `.gql` files couldn't be found. - Typo in changelog +- bug on `~np` message that causes the player to crash ### Changed - name of MiscCommands module from `TemplateCommandModule` to `MiscCommandModule` @@ -33,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - table `messages` to main database where messages are stored for statistical analysis and bug handling - ExtendedEventEmitter class in lib/utils/extended-events.js - Response object that allows the registration of events for messages +- Handling of error event for every VoiceConnection ### Removed - `~volume` command because volume can't be controlled anymore diff --git a/commands/MusicCommands/index.js b/commands/MusicCommands/index.js index daee567..a348806 100644 --- a/commands/MusicCommands/index.js +++ b/commands/MusicCommands/index.js @@ -239,7 +239,7 @@ class MusicCommandModule extends cmdLib.CommandModule { .setImage(utils.YouTube.getVideoThumbnailUrlFromUrl(song.url)) .setColor(0x00aaff)); if (message.id !== message.channel.lastMessageID) { - gh.musicPlayer.off('next', next); + gh.musicPlayer.removeListener('next', next); message.delete(); } }; diff --git a/lib/music/index.js b/lib/music/index.js index 573ba72..c01db3a 100644 --- a/lib/music/index.js +++ b/lib/music/index.js @@ -49,6 +49,11 @@ class MusicPlayer extends xevents.ExtendedEventEmitter { this.voiceChannel = voiceChannel; this._logger.verbose(`Connecting to voiceChannel ${this.voiceChannel.name}`); let connection = await this.voiceChannel.join(); + + connection.on('error', (err) => { + this._logger.error(err.message); + this._logger.debug(err.stack); + }); this._logger.info(`Connected to Voicechannel ${this.voiceChannel.name}`); this.conn = connection; this.emit('connected'); diff --git a/web/http/index.pug b/web/http/index.pug index 71dc031..95650ea 100644 --- a/web/http/index.pug +++ b/web/http/index.pug @@ -71,7 +71,7 @@ head span#mp-queueCount | Songs in Queue span.cell - | Next + | Next span#mp-queueDisplayCount 0 | Songs: #mp-songQueue