Plugins
Source plugins
Add music providers by teaching Discord Player how to find tracks and open audio.
You are reading the v8 docsDev
A source plugin tells Discord Player how to recognize a query, find tracks, and return audio that Remedia can play. Discord Player has no built-in providers, so you register the plugins your bot needs.
import { Player } from 'discord-player';
const player = new Player({
plugins: [mySourcePlugin()],
send,
});mySourcePlugin is your plugin. The manual setup tutorial builds a working one, and the generated bot includes one that restricts hosts.
Choose a topic
Build a source plugin
Match queries, resolve tracks, and return audio.
Media sources
URLs, files, and streams, and what each node can open.
Registration and lifetime
Register, unregister, and clean up.
Advanced
Operations
How handlers are chosen and ordered.
Custom operations
Add your own typed operations.
v7 extractors
Keep a BaseExtractor while you migrate.
Remote source hosts
Run plugins on a separate server and stream to a remote node.
Continue reading
Build a source plugin