music: actually add the end event

This commit is contained in:
Cynthia Foxwell 2022-04-18 22:52:48 -06:00
parent 922f8f614a
commit aa960f0c00

View file

@ -141,6 +141,7 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
voiceStorage.delete(guild_id); voiceStorage.delete(guild_id);
} }
}; };
connection.on("end", connection._music_eventEnd);
voiceStorage.set(guild_id, connection); voiceStorage.set(guild_id, connection);
@ -288,7 +289,7 @@ async function enqueue(
textChannel.createMessage({ textChannel.createMessage({
embeds: [ embeds: [
{ {
title: `:musical_note Now Playing`, title: `:musical_note: Now Playing`,
color: 0x18e3c8, color: 0x18e3c8,
fields: [ fields: [
{ {
@ -396,7 +397,7 @@ command.callback = async function (msg, line) {
type = "sc"; type = "sc";
} else if (REGEX_FILE.test(argStr)) { } else if (REGEX_FILE.test(argStr)) {
type = "file"; type = "file";
} } else if
if (type != null) { if (type != null) {
if (playlist) { if (playlist) {