From 884e1acf7d3982e66f28dc2cd68e74325f704c6c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 28 Mar 2022 14:25:23 -0400 Subject: Added more buttons to control command --- AudioBackend.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'AudioBackend.js') diff --git a/AudioBackend.js b/AudioBackend.js index ec4167d..dbc239a 100644 --- a/AudioBackend.js +++ b/AudioBackend.js @@ -24,10 +24,9 @@ import { MessageEmbed } from 'discord.js' import config from './config.json' assert {type: 'json'} import fs from 'fs' -const player = createAudioPlayer(); +export const player = createAudioPlayer(); export let audio; let fileData; -let txtFile = true; export function voiceInit(bot) { @@ -48,12 +47,12 @@ export function voiceInit(bot) { player.on('idle', () => { console.log("Music has finished playing, shuffling music...") - playAudio(); + playAudio(bot); }) playAudio(bot); connection.subscribe(player); - }) + }).catch(e => { console.error("The voice channel does not exist!\\n(Have you looked at your configuration?)") }) } export function playAudio(bot) { -- cgit v1.2.3