magmaplayer v0.2.2
magmaplayer is in pre-release 0! expect bugs and inconsistent behavior until v1
magmaplayer - a better audio player for discord.js
Magmaplayer is a direct alternative to Lavalink and ytdl-core, designed for use in Discord bots.
It uses the youtube-dl project as an easier and more reliable way to scrape music tracks from the internet.
It supports YouTube, Soundcloud, Bandcamp, Vimeo, and many other popular audio sources.
It has built-in search and playlist functionality.
It automatically updates most of its functionality, so you won't have to worry about any changes breaking the bot.
Magmaplayer is also a work in progress. Please submit issues and PRs on the GitHub repository.
I have a Discord support and development server coming soon...
DOCS (mostly autogenerated)
Install magmaplayer with npm i magmaplayer
Then require it: const magma = require('magmaplayer');
Currently implemented functions:
magma(link, [args,] [options])
- The main function of the bot. Plays music.
- Arguments:
link
: a link to the audio source, or a YT search term.args
: optional; args to pass to youtube-dl.options
: optional; options to pass tochild_process.stream()
.
- Returns a ReadableStream of the audio with these events:
progress
: Object progressyoutubeDlEvent
: String eventType, String eventDataerror
: error errorclose
magma.getInfo(url)
- Arguments:
url
: a valid url.
- Returns an Object of the JSON dump
- Arguments:
magma.isURL(string)
- Arguments:
string
: The string to be checked.
- Returns true if a valid URL, false if invalid
- Arguments:
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago