diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-12-20 17:54:56 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-12-20 18:05:51 -0500 |
| commit | e5c86859e4c6a9a6829bcc2e3cf626b05a873ff7 (patch) | |
| tree | 96c04baa3f064a160a595a0faf73696cc5cf8eaa /AudioBackend/PlayAudio.js | |
| parent | 239b254760381946f57d6cbccb077f5341ca2f30 (diff) | |
| download | DLAP-e5c86859e4c6a9a6829bcc2e3cf626b05a873ff7.tar.gz DLAP-e5c86859e4c6a9a6829bcc2e3cf626b05a873ff7.tar.bz2 DLAP-e5c86859e4c6a9a6829bcc2e3cf626b05a873ff7.zip | |
Revamped next/previous cmds (Voting system); Basic i18n support;
Diffstat (limited to 'AudioBackend/PlayAudio.js')
| -rw-r--r-- | AudioBackend/PlayAudio.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/AudioBackend/PlayAudio.js b/AudioBackend/PlayAudio.js index 5d18534..e8a0f3a 100644 --- a/AudioBackend/PlayAudio.js +++ b/AudioBackend/PlayAudio.js @@ -45,7 +45,7 @@ export async function playAudio(bot) { const resource = createAudioResource('music/' + audio); player.play(resource); - console.log('Now playing: ' + audio); + console.log(`Now playing: ${audio}`); audioState(0); @@ -70,7 +70,7 @@ export async function playAudio(bot) { audio = audio.split('.').slice(0, -1).join('.'); if (txtFile) { - fileData = 'Now Playing: ' + audio; + fileData = `Now Playing: ${audio}`; writeFile('./now-playing.txt', fileData, (err) => { if (err) { console.log(err); } }); @@ -80,17 +80,17 @@ export async function playAudio(bot) { if (metadataEmpty) { statusEmbed.setTitle('Now Playing'); statusEmbed.addFields( - { name: 'Title', value: audio }, - { name: 'Duration', value: duration } + { name: 'Title', value: `${audio}` }, + { name: 'Duration', value: `${duration}` } ); statusEmbed.setColor('#0066ff'); } else { statusEmbed.setTitle('Now Playing'); statusEmbed.addFields( - { name: 'Title', value: audioTitle, inline: true }, - { name: 'Artist', value: audioArtist, inline: true }, + { name: 'Title', value: `${audioTitle}`, inline: true }, + { name: 'Artist', value: `${audioArtist}`, inline: true }, { name: 'Year', value: `${audioYear}` }, - { name: 'Duration', value: duration } + { name: 'Duration', value: `${duration}` } ); statusEmbed.setFooter({ text: `Album: ${audioAlbum}\nFilename: ${audioFile}` }); statusEmbed.setColor('#0066ff'); |
