mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
errory voice
This commit is contained in:
15
src/client/voice/player/DefaultPlayer.js
Normal file
15
src/client/voice/player/DefaultPlayer.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const BasePlayer = require('./BasePlayer');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
class DefaultPlayer extends BasePlayer {
|
||||
|
||||
playFile(file) {
|
||||
const fileStream = fs.createReadStream(file).on('error', console.log);
|
||||
const pcmStream = this.convertStream(fileStream).on('error', console.log);
|
||||
const dispatcher = this.playPCMStream(pcmStream);
|
||||
return dispatcher;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = DefaultPlayer;
|
||||
Reference in New Issue
Block a user