From 6d2b8650972cde46953999195f26c29bb5660d36 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 29 Nov 2022 00:37:42 -0500 Subject: Added duration --- commands/status.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands') diff --git a/commands/status.js b/commands/status.js index b564a88..4e4bebe 100644 --- a/commands/status.js +++ b/commands/status.js @@ -21,7 +21,7 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js'; import { parseFile } from 'music-metadata'; -import { audio, currentTrack, files, playerState, audioTitle, metadataEmpty } from '../AudioBackend.js'; +import { audio, currentTrack, files, playerState, audioTitle, metadataEmpty, formattedDuration } from '../AudioBackend.js'; export default { data: new SlashCommandBuilder() @@ -52,6 +52,7 @@ export default { .setAuthor({ name: `${bot.user.username} Status`, iconURL: bot.user.avatarURL() }) .addFields({ name: 'State', value: playerState }) .addFields({ name: 'Tracks', value: `${audioID}/${files.length}` }) + .addFields({ name: 'Duration', value: formattedDuration }) .setColor('#0066ff'); if (metadataEmpty === true) { -- cgit v1.2.3