Skip to content

feat(bot): playback progress bar in nowplaying/songinfo embed - #1797

Merged
LucasSantana-Dev merged 2 commits into
mainfrom
feat/1768-music-embed-progress
Jul 12, 2026
Merged

LucasSantana-Dev merged 2 commits into
mainfrom
feat/1768-music-embed-progress

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #1768

What

/nowplaying (and /songinfo) embeds now show a playback progress bar with elapsed/total timecodes, so a user can tell if a track is 10% or 90% done without guessing.

How

  • buildTrackEmbed gains an optional options.progressBar param → rendered as a non-inline Progress field only when present.
  • songinfo.execute (the shared renderer both commands use) snapshots the position via discord-player v7's built-in queue.node.createProgressBar({ length: 18, timecodes: true }) — reusing the library helper rather than hand-rolling a bar. Returns null for livestreams/no-duration tracks → field omitted.

Static snapshot at command time (matches the issue's ask); no message-edit loop.

Verify

  • jest buildTrackEmbed nowplaying → 39/39 pass (Progress-field present/omitted; bar threaded from queue.node; null-for-livestream)
  • type:check 0, eslint 0

Other buildTrackEmbed callers (queued/recommended/history) are unaffected — the param is optional and only songinfo passes it.


Summary by cubic

Adds a playback progress bar with elapsed/total timecodes to /nowplaying and /songinfo embeds so users can see how far a track has progressed. Implements #1768 as a one-time snapshot with no message update loop.

  • New Features
    • buildTrackEmbed accepts options.progressBar and shows a non-inline "Progress" field when provided.
    • Both commands snapshot the bar via discord-player v7 queue.node.createProgressBar({ length: 18, timecodes: true }); omitted for livestreams or no-duration tracks.
    • Optional param keeps other buildTrackEmbed callers unchanged.

Written for commit 7474242. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added playback progress bars to track information displayed by the /nowplaying and /songinfo commands.
    • Progress indicators show the current position for playing tracks.
    • Livestreams and tracks without a known position no longer display an unnecessary progress indicator.
    • Track embeds now present playback progress in a dedicated, easy-to-read field.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Music embeds now accept optional playback progress. /songinfo computes progress from the queue node and passes it to the embed builder, which conditionally renders a Progress field. Tests cover playing tracks, livestreams, and absent progress.

Changes

Music embed playback progress

Layer / File(s) Summary
Progress-aware track embed contract
packages/bot/src/utils/general/responseEmbeds/buildTrackEmbed.ts, packages/bot/src/utils/general/responseEmbeds/buildTrackEmbed.spec.ts
buildTrackEmbed accepts an optional progress bar and adds a non-inline Progress field when present; tests cover populated, missing, and null values.
Playback progress command integration
packages/bot/src/functions/music/commands/songinfo.ts, packages/bot/src/functions/music/commands/nowplaying.spec.ts
/songinfo derives a timecoded progress bar from the queue node and passes it to buildTrackEmbed; nowplaying tests assert playing-track and livestream behavior.
Estimated code review effort: 3 (Moderate) ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MusicCommand
  participant GuildQueueNode
  participant createProgressBar
  participant buildTrackEmbed
  participant interactionReply
  MusicCommand->>GuildQueueNode: Read current playback position
  GuildQueueNode->>createProgressBar: Create timecoded progress bar
  createProgressBar-->>MusicCommand: Return progress bar or null
  MusicCommand->>buildTrackEmbed: Pass progressBar option
  buildTrackEmbed-->>MusicCommand: Build track embed
  MusicCommand->>interactionReply: Send embed response
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds elapsed-time progress data to buildTrackEmbed and passes progress bars from queue playback state into bot embeds.
Out of Scope Changes check ✅ Passed The changes stay focused on embed progress display and related tests, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding playback progress bars to nowplaying and songinfo embeds.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1768-music-embed-progress

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@github-actions

github-actions Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Warnings
⚠️

User-facing change without a CHANGELOG.md update. Add a line under ## [Unreleased] if this should appear in release notes. (Or apply the skip-changelog label if this PR does not affect end users.)

Generated by 🚫 dangerJS against 7474242

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Auto-approved: Adds an optional progress bar field to nowplaying/songinfo embeds using discord-player's built-in helper. Isolated change with no impact on core logic; tests pass and existing callers unaffected.

Re-trigger cubic

@LucasSantana-Dev
LucasSantana-Dev enabled auto-merge (squash) July 12, 2026 11:42
@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 1138b59 into main Jul 12, 2026
45 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the feat/1768-music-embed-progress branch July 12, 2026 11:47
LucasSantana-Dev added a commit that referenced this pull request Jul 13, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>2.35.0</summary>

##
[2.35.0](v2.34.0...v2.35.0)
(2026-07-13)


### Features

* **bot:** /bulk-kick — proof-of-pattern for the bulk-* command family
([#1802](#1802))
([1c11f3e](1c11f3e))
* **bot:** add lucky_bot_gateway_connected zombie-detection gauge
([#1774](#1774))
([6cc5287](6cc5287))
* **bot:** playback progress bar in nowplaying/songinfo embed
([#1797](#1797))
([1138b59](1138b59))
* **bot:** post server-count stats to Top.gg for listing visibility
([#1789](#1789))
([e8ca6b9](e8ca6b9))
* **bot:** temporary support ticket channels (/ticket)
([#1803](#1803))
([49601a1](49601a1))
* **live-notif:** youtube polling, message ttl cleanup, api backoff
([#1762](#1762))
([a99b85a](a99b85a))
* **remind:** channel and role broadcast reminders
([#1767](#1767))
([#1807](#1807))
([83ade79](83ade79))


### Bug Fixes

* **backend:** artist suggestions 503 not 500 on upstream timeout
([#1787](#1787))
([eadc20e](eadc20e))
* **bot:** guard skipReason telemetry against null prisma client
([#1773](#1773))
([d73421e](d73421e))
* **ci:** stop auto-update workflow racing on merge push
([#1811](#1811))
([2ddd202](2ddd202))
* **csp:** allow Cloudflare Insights beacon in script-src/connect-src
([#1788](#1788))
([f20c4cf](f20c4cf))
* **deps:** bump eslint in lock to satisfy npm@12 ci (unblock release)
([#1809](#1809))
([68fd0be](68fd0be))
* paginate bulk-move message fetch to respect discord api limit
([#1776](#1776))
([5b5d2fc](5b5d2fc))
* **weekly-digest:** trigger on Sunday and add new-guides RSS section
([#1761](#1761))
([f429fc6](f429fc6))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(bot): elapsed/total-time progress indicator in music embeds

1 participant