Plays music from TIDAL into a Discord channel.
- Install PHP and Composer
- Install FFmpeg for encoding of audio
- Clone this repository
- Copy
config.default.json
toconfig.json
and put in your details - Run
php run.php
You are free to implement this package with your own bot. Require the package with Composer and then use the following:
use TidalBot\Instance;
use Tidal\Tidal;
$discord = new Discord();
$ws = new WebSocket($discord);
$ws->on('ready', function ($discord) use ($ws) {
$textChannel = …; // Replace this with your own text channel.
$voiceChannel = …; // Replace this with your own voice channel.
$tidal = new Tidal();
$tidal->connect(…)->then(function (Tidal $tidal) {
$instance = new Instance(
$discord,
$ws,
$voiceChannel,
$textChannel,
$tidal
);
});
});
$ws->run();
- Add shuffle modes