From b9292504dcaf2d6a0cf55d10507d479ad583cca9 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 7 Apr 2025 14:08:34 -0600 Subject: [PATCH] presence: modernize listening bar --- src/modules/utility/presence.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/utility/presence.js b/src/modules/utility/presence.js index aa852d6..e19753d 100644 --- a/src/modules/utility/presence.js +++ b/src/modules/utility/presence.js @@ -18,7 +18,7 @@ const HangStatusImages = {}; } })(); -const NOWPLAYING_BAR_LENGTH = 30; +const NOWPLAYING_BAR_LENGTH = 32; function fixMediaProxyURL(url) { if (url.includes("media.discordapp.net")) { @@ -193,10 +193,12 @@ presence.callback = async function (msg, line) { const progress = position >= length ? 1 : position / length; const barLength = Math.round(progress * NOWPLAYING_BAR_LENGTH); - const bar = `\`[${"=".repeat(barLength)}${" ".repeat(NOWPLAYING_BAR_LENGTH - barLength)}]\``; - const time = `\`${timePos}${" ".repeat( - NOWPLAYING_BAR_LENGTH + 2 - timePos.length - timeEnd.length - )}${timeEnd}\``; + const bar = `\`\`\`ansi\n${"\u2014".repeat(barLength)}\x1b[30m${"\u2014".repeat( + NOWPLAYING_BAR_LENGTH - barLength + )}\x1b[39m`; + const time = `${timePos}${" ".repeat( + NOWPLAYING_BAR_LENGTH - timePos.length - timeEnd.length + )}${timeEnd}\`\`\``; descLines.push(bar); descLines.push(time);