chore: remove the download feature for top.gg compliance

Merged
LU
3mo ago
+3101-5206

Summary

  • Top.gg's bot guidelines prohibit distributing downloads of copyrighted material without licensing. /download used yt-dlp to rip audio/video from YouTube/Spotify/SoundCloud with no rights check - a likely rejection cause for the pending listing review. Removed entirely (not gated) before resubmission.
  • Drops the download command tree, yt-dlp wrapper + download-path utils, Download prisma model + guild_settings download columns, the download feature toggle (bot/shared/frontend), and the now-dead youtube-dl-exec dep.
  • Separate atomic commit fixes pre-existing unrelated schema drift found while generating the migration: reminders had no FK to guilds since the table was created, and afk_statuses was missing its declared index. Tracked in #1955.
  • Full rationale: decisions/2026-08-09-remove-download-feature-topgg-compliance.md

Test plan

  • type:check clean on all 4 packages (shared/bot/backend/frontend)
  • Full test suite green: shared 73/73, bot 235/236 (1 pre-existing skip), backend 85/85, frontend 86/86
  • prisma migrate reset replayed both new migrations cleanly against local dev DB; prisma migrate status confirms no drift
  • package-lock.json regenerated after dropping youtube-dl-exec

Summary by cubic

Removes the /download command and all download code for Top.gg compliance. Previously users could rip audio/video via yt‑dlp; now the command, related toggles, schema, and dependency are removed. Music playback is unchanged.

  • Drops the download command tree and registration in packages/bot; removes the download category from command constants in packages/bot and @lucky/shared; adds tests for commandCategory.
  • Removes the youtube-dl-exec dependency and regenerates the lockfile.
  • Removes DOWNLOAD_VIDEO/DOWNLOAD_AUDIO feature toggles across @lucky/shared, backend tests, and frontend; updates fixtures and e2e tests to use AUTOPLAY/LYRICS.
  • Migrations: drops the downloads table and guild_settings.allowDownloads/downloadCooldown columns; fixes drift by adding the missing reminders.guildId FK with orphan cleanup and creating the afk_statuses.guildId index. All DDL is guarded per-table for safe, idempotent replays.
  • Updates README and docs/ARCHITECTURE.md, adds an ADR, and removes stale fields from scripts/backfill-guild-settings.mjs.

Rollout

  • Action: run Prisma migrations after merge.
  • Command sync will remove /download on deploy; no changes required for music or other commands.

Summary by CodeRabbit

  • Removed Features

    • Removed the /download command and video/audio download functionality.
    • Removed download-related settings, permissions, cooldowns, and feature toggles.
    • Music, playlist, Spotify, and other commands remain available.
  • Documentation

    • Updated command and architecture documentation.
  • Maintenance

    • Removed obsolete download data and configuration.
    • Improved database schema consistency.