aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AudioBackend.js13
-rw-r--r--commands/about.js16
2 files changed, 17 insertions, 12 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 },
diff --git a/commands/about.js b/commands/about.js
index dbc96c2..442cb48 100644
--- a/commands/about.js
+++ b/commands/about.js
@@ -31,13 +31,15 @@ export default {
async execute(interaction, bot) {
const aboutEmbed = new EmbedBuilder()
.setAuthor({ name: `About ${bot.user.username}`, iconURL: bot.user.avatarURL() })
- .addFields({ name: 'Information', value: 'A Discord bot that plays local audio tracks.' })
- .addFields({ name: 'Version', value: `DLAP ${npmPackage.version}` })
- .addFields({ name: 'Original Creator', value: 'Andrew Lee (Alee#4277)' }) // Do not remove this since I created this :)
- // .addFields({ name: 'Contributors', value: '[your name] (discord#0000)' })
- // .addFields({ name: 'Forked by', value: '[your name] (discord#0000)' })
- .addFields({ name: 'Frameworks', value: `Discord.JS ${version} + Voice` })
- .addFields({ name: 'License', value: 'GNU General Public License v3.0' })
+ .addFields(
+ { name: 'Information', value: 'A Discord bot that plays local audio tracks.' },
+ { name: 'Version', value: `DLAP ${npmPackage.version}` },
+ { name: 'Original Creator', value: 'Andrew Lee (Alee#4277)' }, // Do not remove this since I created this :)
+ // { name: 'Contributors', value: '[your name] (discord#0000)' },
+ // { name: 'Forked by', value: '[your name] (discord#0000)' },
+ { name: 'Frameworks', value: `Discord.JS ${version} + Voice` },
+ { name: 'License', value: 'GNU General Public License v3.0' }
+ )
.setFooter({ text: '© Copyright 2020-2022 Andrew Lee' })
.setColor('#0066ff');