mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Fix stuff
This commit is contained in:
@@ -2,12 +2,12 @@ const BasePlayer = require('./BasePlayer');
|
||||
const fs = require('fs');
|
||||
|
||||
class DefaultPlayer extends BasePlayer {
|
||||
playFile(file, { seek = 0, volume = 1 }) {
|
||||
playFile(file, { seek = 0, volume = 1 } = {}) {
|
||||
const options = { seek: seek, volume: volume };
|
||||
return this.playStream(fs.createReadStream(file), options);
|
||||
}
|
||||
|
||||
playStream(stream, { seek = 0, volume = 1 }) {
|
||||
playStream(stream, { seek = 0, volume = 1 } = {}) {
|
||||
this._shutdown();
|
||||
const options = { seek: seek, volume: volume };
|
||||
const pcmStream = this.convertStream(stream, options);
|
||||
|
||||
Reference in New Issue
Block a user