mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +00:00
Add playArbitraryInput
This commit is contained in:
parent
eacbfbd520
commit
91e0a81d6b
2 changed files with 4 additions and 4 deletions
|
|
@ -181,7 +181,7 @@ class VoiceBroadcast extends EventEmitter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play the given file in the voice connection.
|
* Play the given file in the voice connection.
|
||||||
* @param {string} file The path to the file
|
* @param {string} file The absolute path to the file
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {StreamDispatcher}
|
* @returns {StreamDispatcher}
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -197,7 +197,7 @@ class VoiceBroadcast extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
|
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
|
||||||
const options = { seek, volume, passes };
|
const options = { seek, volume, passes };
|
||||||
return this._playTranscodable(file, options);
|
return this._playTranscodable(`file:${file}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
_playTranscodable(media, options) {
|
_playTranscodable(media, options) {
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ class VoiceConnection extends EventEmitter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play the given file in the voice connection.
|
* Play the given file in the voice connection.
|
||||||
* @param {string} file The path to the file
|
* @param {string} file The absolute path to the file
|
||||||
* @param {StreamOptions} [options] Options for playing the stream
|
* @param {StreamOptions} [options] Options for playing the stream
|
||||||
* @returns {StreamDispatcher}
|
* @returns {StreamDispatcher}
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -238,7 +238,7 @@ class VoiceConnection extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
|
playFile(file, { seek = 0, volume = 1, passes = 1 } = {}) {
|
||||||
const options = { seek, volume, passes };
|
const options = { seek, volume, passes };
|
||||||
return this.player.playUnknownStream(file, options);
|
return this.player.playUnknownStream(`file:${file}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue