Added Track as a valid query type for play() method (#148)
Co-authored-by: Androz <androz2091@gmail.com>
This commit is contained in:
parent
5e3075dad1
commit
a26b764b71
3 changed files with 5 additions and 4 deletions
|
@ -29,6 +29,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/Androz2091/discord-player#readme",
|
||||
"dependencies": {
|
||||
"@types/node": "^14.14.7",
|
||||
"discord-ytdl-core": "^4.1.3",
|
||||
"merge-options": "^2.0.0",
|
||||
"moment": "^2.27.0",
|
||||
|
|
|
@ -319,9 +319,9 @@ class Player extends EventEmitter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Play a track in the server. Supported query types are `keywords`, YouTube video links`, `YouTube playlists links`, Spotify track link` or `SoundCloud song link`.
|
||||
* @param {Discord.Message} message
|
||||
* @param {String} query
|
||||
* Play a track in the server. Supported query types are `keywords`, `YouTube video links`, `YouTube playlists links`, `Spotify track link` or `SoundCloud song link`.
|
||||
* @param {Discord.Message} message Discord `message`
|
||||
* @param {String|Track} query Search query or a valid `Track` object.
|
||||
* @returns {Promise<void>}
|
||||
*
|
||||
* @example
|
||||
|
|
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
|
@ -25,7 +25,7 @@ declare module 'discord-player' {
|
|||
|
||||
public isPlaying(message: Message): boolean;
|
||||
public setFilters(message: Message, newFilters: Partial<Filters>): Promise<void>;
|
||||
public play(message: Message, query: string): Promise<void>;
|
||||
public play(message: Message, query: string | Track): Promise<void>;
|
||||
public pause(message: Message): void;
|
||||
public resume(message: Message): void;
|
||||
public stop(message: Message): void;
|
||||
|
|
Loading…
Reference in a new issue