Fixes to music functions and commands

pull/70/head
Trivernis 6 years ago
parent d65616eadc
commit 86f3ef8c13

@ -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

@ -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();
}
};

@ -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');

@ -71,7 +71,7 @@ head
span#mp-queueCount
| Songs in Queue
span.cell
| Next
| Next
span#mp-queueDisplayCount 0
| Songs:
#mp-songQueue

Loading…
Cancel
Save