@ariijs/lavalink-client
Version:
arii "plugin" / extras for lavalink-client package. fully compatible with commonjs and esm enviroments.
26 lines (25 loc) • 1.37 kB
TypeScript
import { Player as PL, PlayerOptions } from "lavalink-client";
import { Queue } from "./queue.js";
import { LavalinkManager } from "../manager/lavalinkManager.js";
import { SimilarSearchOptions } from "../types/index.js";
export declare class Player extends PL {
LavalinkManager: LavalinkManager;
queue: Queue;
/** returns true if the player is paused (track paused) */
paused: boolean;
constructor(options: PlayerOptions, lavalinkManager: LavalinkManager);
/**
* Skip the current song, or a specific amount of songs
* @param skipTo provide the index of the next track to skip to or a string to search for a track title
* @param throwError if true, throws an error if the skip fails
* @param [withPrevious=false] set true to enable full queue skipping (previous tracks included)
* @param searchOptions search options for the skipTo string search
*/
skip(skipTo?: number | string, throwError?: boolean, withPrevious?: boolean, searchOptions?: SimilarSearchOptions): Promise<this>;
/**
* similar to skip, but it goes to the previous track. use this instead of adding the previous track to the queue and skipping for yourself
* @param throwError if true, it throws an error if there's no previous track
* @returns the player
*/
previous(throwError?: boolean): Promise<this | null>;
}