diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-12-02 22:05:20 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-12-02 22:05:20 -0500 |
| commit | c576ed4e454fe6b4974e7ad873670e3adc9d0a96 (patch) | |
| tree | ae6f06f8f21f78d5023019b64772f484f5377fb7 /backend/PlayAudio.js | |
| parent | e0fe64b06c0eb8b92578ae1bf5a166f8d633c9b3 (diff) | |
| download | DLAP-c576ed4e454fe6b4974e7ad873670e3adc9d0a96.tar.gz DLAP-c576ed4e454fe6b4974e7ad873670e3adc9d0a96.tar.bz2 DLAP-c576ed4e454fe6b4974e7ad873670e3adc9d0a96.zip | |
Fixes to various things
Diffstat (limited to 'backend/PlayAudio.js')
| -rw-r--r-- | backend/PlayAudio.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/PlayAudio.js b/backend/PlayAudio.js index 9b4a83b..3ae2b91 100644 --- a/backend/PlayAudio.js +++ b/backend/PlayAudio.js @@ -28,14 +28,17 @@ import { integer } from '../commands/play.js'; const { statusChannel, txtFile } = JSON.parse(readFileSync('./config.json', 'utf-8')); let fileData; + export let audio; -export let duration; -export let metadataEmpty = false; +export let currentTrack; + +export let metadataEmpty; + export let audioTitle; export let audioArtist; export let audioYear; export let audioAlbum; -export let currentTrack; +export let duration; const inputFiles = readdirSync('music'); export async function playAudio(bot) { @@ -66,7 +69,7 @@ export async function playAudio(bot) { audio = audio.split('.').slice(0, -1).join('.'); - if (txtFile === true) { + if (txtFile) { fileData = 'Now Playing: ' + audio; writeFile('./now-playing.txt', fileData, (err) => { if (err) { console.log(err); } |
