calibur
Back to Inventory
ShippedBot / Audio

AnyaDancing

Self-hosted Discord music bot with multi-platform streaming, 30+ filters, and a custom audio extractor.

Node.jsdiscord.js v14discord-player v7play-dlFFmpegSocket.IOExpressGenius API

The Problem

Most Discord music bots either cost money, get DMCA-killed every six months, or only support one platform. Self-hosted alternatives are bare-bones and lack interactive controls or cross-platform streaming — making it hard to actually run a friendly server-wide jukebox.

The Solution

AnyaDancing is a feature-rich, self-hostable Discord bot streaming audio from YouTube, Spotify (bridged), and SoundCloud through a hand-written extractor layer. It supports both slash and prefix commands simultaneously, ships 30+ real-time audio filters via FFmpeg, and exposes an optional Socket.IO web player for syncing playback to an external dashboard.

Key Features

  • Multi-platform streaming: YouTube, Spotify (bridged), SoundCloud
  • Dual command mode — slash + prefix from the same handler
  • 30+ real-time audio filters (bassboost, nightcore, vaporwave, 8D…)
  • Interactive search UI with 5 results and button selectors
  • Paginated queue viewer with Discord button navigation
  • Now Playing card with Pause/Skip/Disconnect/Queue button controls
  • Genius lyrics integration
  • Discord Together activities (Watch Together, Poker, Chess, etc.)
  • Optional Socket.IO web player sync for external dashboards

Technical Challenges

01 · Custom Audio Extractor

discord-player's stock extractors didn't cover the full multi-platform matrix needed. Solution: hand-rolled extractor.js registered as a named plugin ('dodong') resolving SoundCloud, Spotify (bridged via YouTube search), YouTube URLs, and keyword search — each track exposing a lazy engine() returning the audio stream on demand.

02 · Spotify Bridge

Spotify's API doesn't return audio streams. Solution: parse Spotify metadata via spotify-url-info, then build a YouTube search query of the form `{artist} {title} lyric` and stream the closest match — preserving original Spotify metadata in the embed.

03 · Reusable Paginated Embeds

Multiple commands (queue, search) need paginated embed UX with consistent button behaviour. Solution: a single embedPages.js utility manages pagination, button state, collector timeouts, and auto-disable — used by every paginated surface in the bot.