diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-11-29 08:27:00 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-11-29 08:27:00 -0500 |
| commit | d8068715eff8536bb223b191aaa69efc35af1a36 (patch) | |
| tree | dd8a1a367673f40d7495155d8a2dec688a7aef3a /AudioBackend.js | |
| parent | 6d2b8650972cde46953999195f26c29bb5660d36 (diff) | |
| download | DLAP-d8068715eff8536bb223b191aaa69efc35af1a36.tar.gz DLAP-d8068715eff8536bb223b191aaa69efc35af1a36.tar.bz2 DLAP-d8068715eff8536bb223b191aaa69efc35af1a36.zip | |
Fixed formatting for embeds
Diffstat (limited to 'AudioBackend.js')
| -rw-r--r-- | AudioBackend.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/AudioBackend.js b/AudioBackend.js index b629882..3cd2867 100644 --- a/AudioBackend.js +++ b/AudioBackend.js @@ -169,8 +169,8 @@ export async function playAudio(bot) { return `${hours}:${minutes}:${seconds}`; }; formattedDuration = toHHMMSS(duration); - } catch (error) { - console.error(error.message); + } catch (e) { + console.error(e); } audio = audio.split('.').slice(0, -1).join('.'); @@ -184,11 +184,14 @@ export async function playAudio(bot) { const statusEmbed = new EmbedBuilder(); if (metadataEmpty === true) { - statusEmbed.addFields({ name: 'Now Playing', value: audio }); - statusEmbed.addFields({ name: 'Duration', value: formattedDuration }); + statusEmbed.setTitle({ title: 'Now Playing' }) + statusEmbed.addFields( + { name: 'Title', value: audio }, + { name: 'Duration', value: formattedDuration } + ); statusEmbed.setColor('#0066ff'); } else { - statusEmbed.setTitle('Now Playing'); + statusEmbed.setTitle({ title: 'Now Playing' }); statusEmbed.addFields( { name: 'Title', value: audioTitle }, { name: 'Artist', value: audioArtist }, |
