music: fix typo and leave command

This commit is contained in:
Cynthia Foxwell 2022-12-10 14:53:53 -07:00
parent e0e6e5b0c4
commit e1719fb12c

View file

@ -183,7 +183,7 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
voiceStorage.delete(guild_id);
}
};
state.player.on(AudioPlayerStatus.Idle, state.End);
state.player.on(AudioPlayerStatus.Idle, state.onEnd);
voiceStorage.set(guild_id, state);
return state;
@ -611,8 +611,8 @@ command.callback = async function (
}
// TODO: skip lock checks
connection._music_queue = [];
connection._music_leave = true;
connection.queue = [];
connection.__leave = true;
await connection.stopPlaying();
await hf.bot.leaveVoiceChannel(msg.member.voiceState.channelID);
return {reaction: "\uD83D\uDC4B"};