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