Skip to content

fix(bot): persist autoplay preference across sessions - #468

Closed
LucasSantana-Dev wants to merge 12 commits into
mainfrom
fix/autoplay-persist-preference
Closed

LucasSantana-Dev wants to merge 12 commits into
mainfrom
fix/autoplay-persist-preference

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Apr 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

/autoplay only toggled the in-memory queue mode. When the queue was empty or the bot restarted, the preference was lost — users had to re-enable autoplay every session.

Solution

  • Persist preference: /autoplay now writes the enabled/disabled state to guildSettings via guildSettingsService.
  • Apply on play: /play reads the stored autoplay preference at startup and seeds the queue mode accordingly, so autoplay is active from the first track.
  • Typed helper: Extracted storedAutoplayMode() typed against QueueRepeatMode to avoid raw enum casts.
  • Error surfacing: Persistence failures are now logged (warn) instead of silently swallowed; play fallback errors are also logged.

Files Changed

File Change
packages/bot/src/functions/music/commands/autoplay.ts Persist preference to DB; surface errors
packages/bot/src/functions/music/commands/play/index.ts Read stored preference and seed queue mode
packages/bot/src/functions/music/commands/autoplay.spec.ts Full coverage: toggle, persistence, error paths
packages/bot/src/functions/music/commands/play/index.spec.ts Coverage: stored preference seeding, fallback, guard

Test Coverage

  • 678 tests pass across 53 suites (no regressions)
  • New branches covered: toggle defaults, queue seeding, persistence errors, fallback paths, existing-queue guard

Breaking Changes

None — purely additive behavior. Guilds without a stored preference default to the previous behavior (autoplay off).

Summary by CodeRabbit

  • New Features

    • Guild autoplay preferences now persist across sessions and are automatically applied when starting playback.
  • Bug Fixes

    • Improved error handling when saving autoplay preferences fails, with clear user feedback.
    • Added duplicate track prevention during queue replenishment.

LucasSantana-Dev and others added 12 commits April 2, 2026 01:27
…ive queue

- autoplay: remove requireQueue gate; when no queue exists, persist
  preference to guild settings (Redis) and confirm to user that it will
  be applied on next /play. When queue exists, set the repeat mode AND
  persist the preference so it survives bot restarts.
- play: after creating a queue, read guild settings and auto-enable
  QueueRepeatMode.AUTOPLAY if autoPlayEnabled is true.
- Tests updated: removed requireQueue mock, added guildSettingsService
  mock, new test cases for no-queue preference save/toggle.
- autoplay: default null guild settings to autoPlayEnabled=true to match
  GuildSettingsService defaults; keep no-queue toggles aligned with fresh
  queue behavior.
- autoplay: if setGuildSettings returns false, stop success flow and send
  persistence-failure feedback instead of claiming the preference was saved.
- play: always read stored autoplay preference and apply both AUTOPLAY and OFF,
  so an idle /autoplay disable correctly wins over fresh queue defaults.
- tests: update autoplay/play specs for default-enabled fallback, persistence
  failure messaging, and stored autoPlayEnabled:false overriding a fresh queue.
- autoplay: default null guild settings to autoPlayEnabled=true so /autoplay
  matches GuildSettingsService defaults and fresh queue behavior; persistence
  failures already surface as warning/error embeds instead of false success.
- play: stored autoPlayEnabled:false now overrides a fresh queue's default
  AUTOPLAY repeat mode, while true still re-applies AUTOPLAY.
- tests: update autoplay expectations for default-enabled fallback and add OFF to
  QueueRepeatMode mock so the fresh-queue disable case asserts correctly.
@vercel

vercel Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 2, 2026 5:53pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The autoplay and play commands are refactored to persist autoplay preferences in guild settings instead of only using queue state. The autoplay command now calls guildSettingsService.setGuildSettings to save enable/disable changes and uses a new resolveCurrentAutoplayState helper to check both queue state and persisted settings. The play command applies stored autoplay preferences to newly created queues via applyStoredAutoplayPreference. Tests are rewritten to validate persistence, error handling, and the new control flow.

Changes

Cohort / File(s) Summary
Autoplay Command
packages/bot/src/functions/music/commands/autoplay.ts, packages/bot/src/functions/music/commands/autoplay.spec.ts
Refactored to persist autoplay state in guild settings via guildSettingsService.setGuildSettings. Replaced requireQueue guard with resolveCurrentAutoplayState helper that checks queue repeatMode or falls back to persisted autoPlayEnabled. Added ephemeral error replies for persistence failures. Tests rewritten to validate persistence calls, missing queue scenarios, and failure modes.
Play Command
packages/bot/src/functions/music/commands/play/index.ts, packages/bot/src/functions/music/commands/play/index.spec.ts
Added conditional application of stored autoplay preferences to newly created queues via new applyStoredAutoplayPreference helper. Improved error handling for failed reply operations with warning logs. Tests extended to cover stored preference application, de-duplication of reinsererted tracks, and guild settings lookup failures.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Interaction as Discord Interaction
    participant AutoplayCmd as Autoplay Command
    participant GuildSettings as Guild Settings Service
    participant Queue as Queue/Player

    User->>Interaction: Toggle autoplay
    Interaction->>AutoplayCmd: Execute command
    
    alt Queue exists
        AutoplayCmd->>Queue: Check current repeatMode
    else Queue doesn't exist
        AutoplayCmd->>GuildSettings: Get stored autoPlayEnabled
        GuildSettings-->>AutoplayCmd: autoPlayEnabled (boolean)
    end

    AutoplayCmd->>GuildSettings: Set autoPlayEnabled to new state
    
    alt Persistence succeeds
        GuildSettings-->>AutoplayCmd: Saved
        alt Enable with active queue
            AutoplayCmd->>Queue: Replenish queue
        end
        AutoplayCmd->>Interaction: Reply with confirmation
    else Persistence fails
        GuildSettings-->>AutoplayCmd: Error
        AutoplayCmd->>Interaction: Reply with ephemeral error
    end
    
    Interaction-->>User: Show result
Loading
sequenceDiagram
    actor User
    participant Interaction as Discord Interaction
    participant PlayCmd as Play Command
    participant GuildSettings as Guild Settings Service
    participant Player as Discord Player
    participant Queue as Queue

    User->>Interaction: Play a track
    Interaction->>PlayCmd: Execute command
    PlayCmd->>Player: Check if queue exists (hadQueueBeforePlay)
    Player-->>PlayCmd: Queue status

    PlayCmd->>Player: Play track
    Player->>Queue: Create/use queue
    Player-->>PlayCmd: Queue created/updated

    alt Queue is newly created
        PlayCmd->>GuildSettings: Get stored autoplay preference
        GuildSettings-->>PlayCmd: autoPlayEnabled (boolean)
        
        alt Preference exists
            PlayCmd->>Queue: Apply stored autoPlayEnabled as repeatMode
            Queue-->>PlayCmd: repeatMode updated
        end
    end

    PlayCmd->>Interaction: Reply with success
    Interaction-->>User: Playback started
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

size/l

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature introduced: persisting the autoplay preference so it survives bot restarts and empty queues, which is the core problem being solved across the modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/autoplay-persist-preference

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot added the size/l label Apr 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Apr 2, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (2)
packages/bot/src/functions/music/commands/play/index.ts (1)

92-94: Minor race window between queue existence check and preference application.

The queue state is checked before client.player.play (line 92) but the preference is applied after (line 118). If another command creates a queue concurrently during the play() call, hadQueueBeforePlay could be stale. The impact is low (preference may be skipped or applied to an already-configured queue), but worth noting for future hardening.

Also applies to: 118-123

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/functions/music/commands/play/index.ts` around lines 92 -
94, The current check for queue existence using hadQueueBeforePlay via
resolveGuildQueue(client, interaction.guildId ?? '').queue happens before
calling client.player.play, creating a race where another command could create
the queue during play; fix by moving the queue-existence check or preference
application to use the authoritative queue instance after play returns (or use
the queue object returned/created by client.player.play) and then apply the
preference to that queue (i.e., reference the same queue object instead of the
pre-play boolean). Specifically, update the logic around hadQueueBeforePlay,
resolveGuildQueue, and client.player.play so you compute/apply preferences
against the post-play queue instance (or re-resolve the queue immediately after
play) to eliminate the stale boolean window.
packages/bot/src/functions/music/commands/autoplay.ts (1)

19-51: Extract nested ternary operations into helper variables for readability.

SonarCloud flags the nested ternaries at lines 29-35 and 36-42. The current structure is difficult to parse and maintain.

♻️ Proposed refactor to improve readability
 async function replyAutoplayPersistenceFailure(
     interaction: ChatInputCommandInteraction,
     queue: GuildQueue | null,
     enabled: boolean,
 ): Promise<void> {
+    const title = getFailureTitle(queue, enabled)
+    const description = getFailureDescription(queue, enabled)
+
     await interactionReply({
         interaction,
         content: {
             embeds: [
                 createEmbed({
-                    title: enabled
-                        ? queue
-                            ? 'Autoplay enabled for current queue only'
-                            : 'Autoplay preference not saved'
-                        : queue
-                          ? 'Autoplay disabled for current queue only'
-                          : 'Autoplay preference not saved',
-                    description: enabled
-                        ? queue
-                            ? 'Autoplay was enabled on the active queue, but the preference could not be saved for future sessions.'
-                            : 'Could not save autoplay preference. Please try again.'
-                        : queue
-                          ? 'Autoplay was disabled on the active queue, but the preference could not be saved for future sessions.'
-                          : 'Could not update autoplay preference. Please try again.',
+                    title,
+                    description,
                     color: EMBED_COLORS.ERROR as ColorResolvable,
                     emoji: EMOJIS.ERROR,
                     timestamp: true,
                 }),
             ],
             ephemeral: true,
         },
     })
 }
+
+function getFailureTitle(queue: GuildQueue | null, enabled: boolean): string {
+    if (enabled) {
+        return queue
+            ? 'Autoplay enabled for current queue only'
+            : 'Autoplay preference not saved'
+    }
+    return queue
+        ? 'Autoplay disabled for current queue only'
+        : 'Autoplay preference not saved'
+}
+
+function getFailureDescription(
+    queue: GuildQueue | null,
+    enabled: boolean,
+): string {
+    if (enabled) {
+        return queue
+            ? 'Autoplay was enabled on the active queue, but the preference could not be saved for future sessions.'
+            : 'Could not save autoplay preference. Please try again.'
+    }
+    return queue
+        ? 'Autoplay was disabled on the active queue, but the preference could not be saved for future sessions.'
+        : 'Could not update autoplay preference. Please try again.'
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bot/src/functions/music/commands/autoplay.ts` around lines 19 - 51,
The nested ternaries in replyAutoplayPersistenceFailure (used to build the embed
title and description) reduce readability; compute two helper variables (e.g.,
titleText and descriptionText) before calling interactionReply by branching on
enabled and queue to set the appropriate strings, then pass those variables into
createEmbed for title and description; keep color: EMBED_COLORS.ERROR and emoji:
EMOJIS.ERROR unchanged and preserve the existing ephemeral embed payload.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/bot/src/functions/music/commands/autoplay.ts`:
- Around line 19-51: The nested ternaries in replyAutoplayPersistenceFailure
(used to build the embed title and description) reduce readability; compute two
helper variables (e.g., titleText and descriptionText) before calling
interactionReply by branching on enabled and queue to set the appropriate
strings, then pass those variables into createEmbed for title and description;
keep color: EMBED_COLORS.ERROR and emoji: EMOJIS.ERROR unchanged and preserve
the existing ephemeral embed payload.

In `@packages/bot/src/functions/music/commands/play/index.ts`:
- Around line 92-94: The current check for queue existence using
hadQueueBeforePlay via resolveGuildQueue(client, interaction.guildId ??
'').queue happens before calling client.player.play, creating a race where
another command could create the queue during play; fix by moving the
queue-existence check or preference application to use the authoritative queue
instance after play returns (or use the queue object returned/created by
client.player.play) and then apply the preference to that queue (i.e., reference
the same queue object instead of the pre-play boolean). Specifically, update the
logic around hadQueueBeforePlay, resolveGuildQueue, and client.player.play so
you compute/apply preferences against the post-play queue instance (or
re-resolve the queue immediately after play) to eliminate the stale boolean
window.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 601a4f5a-854d-49df-b62c-56a5daaab3a4

📥 Commits

Reviewing files that changed from the base of the PR and between 63f30a2 and 150fd74.

📒 Files selected for processing (4)
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
  • packages/bot/src/functions/music/commands/play/index.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Quality Gates
  • GitHub Check: SonarCloud Scan
🧰 Additional context used
📓 Path-based instructions (20)
**/*.{js,jsx,ts,tsx,vue,html}

📄 CodeRabbit inference engine (.cursor/rules/accessibility-openness.mdc)

Provide accessible UI components using semantic HTML and ARIA attributes where necessary

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/dependency-injection.mdc)

**/*.{ts,tsx,js,jsx}: Prefer constructor injection for classes that require dependencies
Avoid global mutable singletons unless necessary
Use explicit interfaces for external dependencies to make testing easier

**/*.{ts,tsx,js,jsx}: Include required references in PRs/code for non-trivial logic: TypeScript (official docs), MDN (JavaScript reference), and official docs for any runtime/framework/libraries used (e.g., Node.js, React) as applicable.
Before assuming behavior of an API, include the doc link and a ≤25-word quote when the change relies on it.

**/*.{ts,tsx,js,jsx}: Prefer named exports for clear usage and easier refactors in TypeScript/JavaScript
Keep import order consistent: external first, then internal modules
Remove dead code and unused imports

**/*.{ts,tsx,js,jsx}: Use PascalCase naming convention for React/UI components
Use camelCase naming convention for variables and functions
Use UPPER_SNAKE_CASE naming convention for constants
Maintain consistent import grouping and ordering within the project, keeping third-party imports separate from local imports
For external data sources (HTTP, database), always validate and sanitize input using type guards or schema validators

**/*.{ts,tsx,js,jsx}: Use Prettier with no semicolons, single quotes, 4-space indent, 80 character width
Files must not exceed 250 lines and this is enforced

Implement TypeScript typecheck and linter in CI quality checks

**/*.{ts,tsx,js,jsx}: Use TypeScript for enhanced type safety
Implement error handling and error logging
Avoid commenting code unless extremely necessary - code should explain itself with descriptive names
Leave NO todos, placeholders or missing pieces in the code
Variables and functions must use camelCase
Constants must use UPPER_SNAKE_CASE
Use arrow functions for methods and computed properties
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
Maintain consistent import grouping/order: external imports first, then...

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

**/*.{js,jsx,ts,tsx}: Never throw strings. Throw Error (or typed subclasses) with descriptive messages
Include causal error as cause when available for better debugging
Define clear, stable error codes (e.g., ERR_AUTH_EXPIRED, ERR_NETWORK_TIMEOUT)
Provide optional metadata (e.g., details, retryable, status, correlationId) in error objects
Use domain error classes per area (e.g., AuthenticationError, ValidationError, NetworkError)
Log errors with structure (message, code, stack, cause, correlationId, user context where appropriate)
Mark retryable vs nonRetryable errors where helpful for operations
Set timeouts and handle aborts/cancellations; avoid dangling requests in API/network code
Implement backoff for transient failures; avoid infinite retries
Map HTTP status → domain errors; 4xx vs 5xx behave differently (e.g., retry for 5xx/network)

**/*.{js,jsx,ts,tsx}: Use functional components with hooks in React/React Native. Avoid class components.
Keep components focused on a single responsibility; extract complex logic into custom hooks.
Keep state local when possible. Use Context/Zustand/Redux only when necessary for state management.
If props or state traverse more than 3 levels, consider using context or a feature-scoped store instead of prop drilling.
Use performance optimization techniques: React.memo, useMemo, useCallback, Suspense (web), and virtualization for long lists; avoid unnecessary re-renders.
Web accessibility: use semantic HTML, labels, focus management, keyboard navigation, and aria-* attributes as needed.
React Native accessibility: use accessibility props (accessible, accessibilityLabel), proper roles and labels.
Identify and extract repetitive UI components proactively to components/ with clear props and minimal coupling.
Web styles: prefer co-located styles or design system tokens; avoid global style leakage.
React Native styles: prefer StyleSheet.create, design tokens, and theme providers; avoid in...

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/index.ts

📄 CodeRabbit inference engine (.cursor/rules/pattern.mdc)

Use index.ts only to re-export a small, intentional surface per module

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/pattern.mdc)

Introduce interfaces at module boundaries to enable testing and substitutions

**/*.{ts,tsx}: Avoid using any type in TypeScript. If unavoidable, use unknown with type guards and justify with a code comment
Prefer interface for defining public object shapes in TypeScript, use type for unions and utility types
Use TypeScript utility types such as Partial, Pick, Omit, Readonly, and Record when appropriate
Use I{Name} naming convention for interfaces in TypeScript
Use T{Name} naming convention for type aliases and utility types in TypeScript

**/*.{ts,tsx}: Functions must be less than 50 lines with cyclomatic complexity less than 10
Do not use any types - ESLint enforces this at error level

**/*.{ts,tsx}: Prefer types over interfaces for most cases
Don't ever use any - type safety always
Avoid enums; use const objects instead
For complex types, create a separate file to declare them and import them
Avoid using any type; if unavoidable, use unknown with type guards and justify with code comment
Prefer interface for public API shapes; use type for unions and utility types
Use TypeScript utility types (Partial, Pick, Omit, Readonly, Record)

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/documentation.mdc)

**/*.{js,ts,tsx,jsx}: Minimize comments in code; explain the 'why' when non-obvious, let code express the 'what' through clear naming
Document trade-offs briefly when deviating from ideal patterns

**/*.{js,ts,tsx,jsx}: Store secrets, ports, and hosts in environment variables (.env, .env.example) and never hardcode them
Avoid redundant or decorative AI comments; code should be self-explanatory and only commented when logic is non-obvious; prefer refactoring over lengthy comments

Never hardcode secrets, IPs, or ports; use .env and docs/ for required configuration variables

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/functions/*/commands/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/lucky-discord-bot.mdc)

packages/bot/src/functions/*/commands/**/*.{ts,tsx}: Command model must include data (slash builder), execute, and category properties exported from packages/bot/src/models/Command.ts
Use @discordjs/builders for building the data (SlashCommandBuilder) in command definitions
Command execute function must receive { interaction, client } parameters from CommandExecuteParams type
Use interactionReply and createUserFriendlyError utilities from @lucky/shared/general utils for command replies and error handling
Use existing validators from packages/bot/src/utils/command/ for voice channel, queue, and guild validations in commands

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/lucky-discord-bot.mdc)

packages/bot/**/*.{ts,tsx}: Use useMainPlayer() from discord-player to access the player instance; do not instantiate player directly
Do not duplicate queue or player state outside Discord Player; use shared services from @lucky/shared for persistent data like track history and session information
Use errorLog and debugLog from @lucky/shared/utils for logging throughout the bot package
Use embed and reply utilities from @lucky/shared for consistent message formatting and error sanitization across the bot
Use services from @lucky/shared (DatabaseService, Redis client) for database and cache access; do not instantiate Prisma or Redis directly in the bot package

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/**

📄 CodeRabbit inference engine (.cursor/rules/lucky-project.mdc)

The bot package depends on shared and contains Discord bot commands and player handlers using Discord.js and Discord Player

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{js,mjs,ts,mts}

📄 CodeRabbit inference engine (.cursor/rules/lucky-project.mdc)

Use Node.js version ≥22 with ESM (ECMAScript modules) only; no CommonJS

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/functions/{general,music,download}/commands/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/subagent-discord.mdc)

packages/bot/src/functions/{general,music,download}/commands/**/*.ts: Apply .cursor/rules/lucky-discord-bot.mdc rules for Discord bot commands and player implementation
Use .cursor/skills/discord-commands/SKILL.md for implementing slash commands

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/functions/music/commands/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/subagent-discord.mdc)

Use .cursor/skills/music-queue-player/SKILL.md for play, queue, skip, volume commands and player lifecycle management

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/subagent-discord.mdc)

Use @lucky/shared for database, Redis, logging, and embed utilities instead of implementing them locally

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/functions/music/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/subagent-discord.mdc)

Use existing voice/queue/guild validators before manipulating player or queue state

Files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
packages/bot/src/functions/**/commands/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Discord bot commands must be structured in packages/bot/src/functions/<category>/commands/<name>.ts with handlers in <category>/handlers/

Files:

  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/frontend.mdc)

**/*.{test,spec}.{js,jsx,ts,tsx}: Test behavior, not implementation. Prefer Testing Library utilities for testing React/React Native components.
For React Native tests: mock native modules and test component interactions and accessibility labels.

Files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/pattern.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Test behavior, not implementation details
Prefer unit tests for core logic; add integration tests at meaningful boundaries

Files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/testing-quality.mdc)

**/*.{test,spec}.{js,ts,jsx,tsx}: Use Jest + a React testing library for unit and component tests as applicable
Test behavior, not implementation details

Files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.{spec,test}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/quality.mdc)

**/*.{spec,test}.{ts,tsx,js,jsx}: Use Jest for unit and integration tests
Test behavior, not implementation details
Run unit, integration tests, and coverage report in CI quality checks

Files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
**/*.spec.ts

📄 CodeRabbit inference engine (.cursor/rules/quality.mdc)

Unit tests must use naming convention *.spec.ts

Files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Do not duplicate queue or player state outside Discord Player; use shared services from `lucky/shared` for persistent data like track history and session information
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/music/commands/**/*.ts : Use `.cursor/skills/music-queue-player/SKILL.md` for play, queue, skip, volume commands and player lifecycle management
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/music/**/*.ts : Use existing voice/queue/guild validators before manipulating player or queue state
📚 Learning: 2026-03-09T20:21:52.065Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/music/commands/**/*.ts : Use `.cursor/skills/music-queue-player/SKILL.md` for play, queue, skip, volume commands and player lifecycle management

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:52.065Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/music/**/*.ts : Use existing voice/queue/guild validators before manipulating player or queue state

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Do not duplicate queue or player state outside Discord Player; use shared services from `lucky/shared` for persistent data like track history and session information

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:52.065Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/{general,music,download}/commands/**/*.ts : Apply `.cursor/rules/lucky-discord-bot.mdc` rules for Discord bot commands and player implementation

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-15T21:57:49.951Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-15T21:57:49.951Z
Learning: When working on music queue/player features (play/queue/skip/volume, player lifecycle), use the `music-queue-player` skill

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Use `useMainPlayer()` from `discord-player` to access the player instance; do not instantiate player directly

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:08.612Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-project.mdc:0-0
Timestamp: 2026-03-09T20:21:08.612Z
Learning: Applies to packages/bot/** : The `bot` package depends on `shared` and contains Discord bot commands and player handlers using Discord.js and Discord Player

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/src/functions/*/commands/**/*.{ts,tsx} : Use existing validators from `packages/bot/src/utils/command/` for voice channel, queue, and guild validations in commands

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/src/functions/*/commands/**/*.{ts,tsx} : Use `interactionReply` and `createUserFriendlyError` utilities from `lucky/shared/general` utils for command replies and error handling

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/autoplay.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:52.065Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/functions/{general,music,download}/commands/**/*.ts : Use `.cursor/skills/discord-commands/SKILL.md` for implementing slash commands

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/src/functions/*/commands/**/*.{ts,tsx} : Command `execute` function must receive `{ interaction, client }` parameters from `CommandExecuteParams` type

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/src/functions/*/commands/**/*.{ts,tsx} : Command model must include `data` (slash builder), `execute`, and `category` properties exported from `packages/bot/src/models/Command.ts`

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Use `errorLog` and `debugLog` from `lucky/shared/utils` for logging throughout the bot package

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/src/functions/*/commands/**/*.{ts,tsx} : Use `discordjs/builders` for building the `data` (SlashCommandBuilder) in command definitions

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.ts
📚 Learning: 2026-03-09T20:21:08.612Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-project.mdc:0-0
Timestamp: 2026-03-09T20:21:08.612Z
Learning: Applies to {packages/*/tests/**/*.test.{js,ts},tests/**/*.test.{js,ts}} : Add or adjust unit and integration tests when changing behavior; follow existing patterns in `packages/*/tests` and root `tests/` directories

Applied to files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:31.459Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/quality.mdc:0-0
Timestamp: 2026-03-09T20:21:31.459Z
Learning: Applies to **/*.{spec,test}.{ts,tsx,js,jsx} : Test behavior, not implementation details

Applied to files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
📚 Learning: 2026-03-15T21:57:49.951Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-15T21:57:49.951Z
Learning: When working on unit tests, Jest ESM mocks, or fixing disabled tests, use the `testing-lucky` skill

Applied to files:

  • packages/bot/src/functions/music/commands/autoplay.spec.ts
  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:52.065Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-discord.mdc:0-0
Timestamp: 2026-03-09T20:21:52.065Z
Learning: Applies to packages/bot/src/**/*.ts : Use `lucky/shared` for database, Redis, logging, and embed utilities instead of implementing them locally

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Use embed and reply utilities from `lucky/shared` for consistent message formatting and error sanitization across the bot

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:15.595Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-shared.mdc:0-0
Timestamp: 2026-03-09T20:21:15.595Z
Learning: Applies to packages/shared/**/*.ts : Organize the Lucky Shared Package with the following directory structure: Config in `packages/shared/src/config/` (environment, constants, feature toggles, YouTube config); Services in `packages/shared/src/services/` (DatabaseService, Redis client/operations, FeatureToggleService, ReactionRoles, RoleManagement); Types in `packages/shared/src/types/` (errors, commands, common, discord, music); Utils in `packages/shared/src/utils/` (error handling, retry, embeds, log, monitoring, composables, prismaClient)

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:20:47.877Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/lucky-discord-bot.mdc:0-0
Timestamp: 2026-03-09T20:20:47.877Z
Learning: Applies to packages/bot/**/*.{ts,tsx} : Use services from `lucky/shared` (DatabaseService, Redis client) for database and cache access; do not instantiate Prisma or Redis directly in the bot package

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.spec.ts
📚 Learning: 2026-03-09T20:21:38.098Z
Learnt from: CR
Repo: LucasSantana-Dev/Lucky PR: 0
File: .cursor/rules/subagent-backend.mdc:0-0
Timestamp: 2026-03-09T20:21:38.098Z
Learning: Applies to packages/backend/**/*.ts : Use `lucky/shared` for config and DB/Redis when needed in backend code

Applied to files:

  • packages/bot/src/functions/music/commands/play/index.spec.ts
🪛 GitHub Check: SonarCloud Code Analysis
packages/bot/src/functions/music/commands/autoplay.ts

[warning] 40-42: Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Lucky&issues=AZ1MiDq-01085IqLUJlh&open=AZ1MiDq-01085IqLUJlh&pullRequest=465


[warning] 33-35: Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Lucky&issues=AZ1MiDq-01085IqLUJlf&open=AZ1MiDq-01085IqLUJlf&pullRequest=465


[warning] 30-32: Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Lucky&issues=AZ1MiDq-01085IqLUJle&open=AZ1MiDq-01085IqLUJle&pullRequest=465


[warning] 37-39: Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=LucasSantana-Dev_Lucky&issues=AZ1MiDq-01085IqLUJlg&open=AZ1MiDq-01085IqLUJlg&pullRequest=465

🔇 Additional comments (16)
packages/bot/src/functions/music/commands/play/index.ts (3)

7-8: LGTM!

Imports are correctly added from @lucky/shared for logging utilities and the guild settings service, following the project's established patterns.


170-176: LGTM!

Error handling improvement correctly logs the warning with guild context, enabling better debugging when Discord API replies fail.


181-211: LGTM!

The helper function is well-structured:

  • Validates settings type before applying
  • Only updates repeat mode when it differs from target (avoiding unnecessary state changes)
  • Properly logs errors and success states
  • Fails gracefully without disrupting the play flow

The null-settings fallback correctly implements the PR objective: guilds without stored preferences default to previous behavior (autoplay off).

packages/bot/src/functions/music/commands/autoplay.ts (4)

53-87: LGTM!

The disable handler properly:

  • Applies mode to queue when available (optional chaining handles null)
  • Persists preference regardless of queue state
  • Provides clear user feedback on persistence failure vs success

89-131: LGTM!

The enable handler correctly:

  • Still replenishes the queue on persistence failure when a track exists, providing immediate value to the user
  • Varies the success message based on queue presence, setting proper expectations
  • Uses fire-and-forget for queue replenishment to avoid blocking the user response

184-193: LGTM!

The state resolution correctly prioritizes queue state (when active) over persisted settings, with a sensible default of false for guilds without stored preferences.


202-238: LGTM!

The command execute function properly:

  • Validates guild context before proceeding
  • Logs diagnostic information for queue resolution misses
  • Handles errors gracefully with user-friendly feedback
packages/bot/src/functions/music/commands/autoplay.spec.ts (4)

1-67: LGTM!

Test setup is well-organized with appropriate mocks for the new persistence functionality. The mock structure correctly mirrors the real service interface.


119-194: LGTM!

Toggle tests comprehensively verify:

  • Queue repeat mode changes
  • Persistence calls with correct enable/disable values
  • Queue replenishment on enable (and absence on disable)
  • User-facing message variations based on queue presence

196-294: LGTM!

Persistence failure tests correctly verify:

  • Warning logs are emitted with appropriate messages
  • User sees queue-specific vs preference-specific error messages
  • Queue replenishment still occurs on enable failure when track exists (graceful degradation)

296-445: LGTM!

Excellent test coverage including:

  • Stored preference toggle behavior (both directions)
  • Edge case: missing guildId early return
  • Async behavior: reply completes before replenishment finishes
  • Error logging on replenish and execution failures
packages/bot/src/functions/music/commands/play/index.spec.ts (5)

1-68: LGTM!

Test setup correctly adds mocks for the new logging functions and guild settings service, maintaining consistency with the autoplay.spec.ts patterns.


181-209: LGTM!

Test correctly simulates the new-queue scenario by:

  • First resolveGuildQueue call returns no queue (pre-play)
  • Second call returns the newly created queue (post-play)
  • Verifies both the repeat mode change and debug logging

211-293: LGTM!

Tests correctly verify the guard conditions:

  • Active queue with autoplay is not overridden by stored disabled preference
  • Existing queue before play doesn't trigger preference application
  • Warning log is emitted on settings lookup failure

295-398: LGTM!

Track de-duplication tests comprehensively cover:

  • Match by track ID
  • Match by track URL
  • Match by object reference
  • Ensures moveUserTrackToPriority is correctly skipped for duplicates

436-453: LGTM!

Test correctly verifies the new error handling behavior: when editReply fails, a warning is logged with the guild context for debugging purposes.

@LucasSantana-Dev

Copy link
Copy Markdown
Owner Author

Closing as superseded by #465, which shipped the autoplay persistence behavior with tests and deploy validation. This branch is now behind main and conflicts on rebase.

@LucasSantana-Dev
LucasSantana-Dev deleted the fix/autoplay-persist-preference branch May 23, 2026 02:21

This branch was successfully deployed

1 active deployment
Preview — 150fd74a Deployed Apr 2, 2026 by vercel[bot]
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.

1 participant