music: debug time

This commit is contained in:
Cynthia Foxwell 2022-12-10 15:17:07 -07:00
parent ffa8ceec92
commit 07eacf747b
1 changed files with 4 additions and 6 deletions

View File

@ -174,12 +174,9 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
state.player.stop();
state.connection.disconnect();
if (!state.__leave) {
await hf.bot.guilds
.get(guild_id)
.channels.get(text_id)
.createMessage({
content: ":musical_note: Queue is empty, leaving voice channel.",
});
await hf.bot.guilds.get(guild_id).channels.get(text_id).createMessage({
content: ":musical_note: Queue is empty, leaving voice channel.",
});
await hf.bot.leaveVoiceChannel(voice_id);
}
state.player.off(AudioPlayerStatus.Idle, state.onEnd);
@ -343,6 +340,7 @@ async function enqueue({
}
const resource = createAudioResource(media.stream, {inputType: media.type});
console.log(resource);
connection.player.play(resource);
textChannel.createMessage({