@ariijs/lavalink-client
Version:
arii "plugin" / extras for lavalink-client package. fully compatible with commonjs and esm enviroments.
68 lines (67 loc) • 2.52 kB
TypeScript
import { PlayerOptions, LavalinkManager as LM, MiniMap } from "lavalink-client";
import { DeezerManagerOptions, ManagerOptions } from "../types/index.js";
import { Player } from "../player/player.js";
export declare class LavalinkManager extends LM {
readonly players: MiniMap<string, Player>;
/** deezer category */
deezer: DeezerManagerOptions;
constructor(options: ManagerOptions);
/**
* Get a Player from Lava
* @param guildId The guildId of the player
*
* @example
* ```ts
* const player = client.lavalink.getPlayer(interaction.guildId);
* ```
* A quicker and easier way than doing:
* ```ts
* const player = client.lavalink.players.get(interaction.guildId);
* ```
* @returns
*/
getPlayer(guildId: string): Player | undefined;
/**
* Create a Music-Player. If a player exists, then it returns it before creating a new one
* @param options
* @returns
*
* @example
* ```ts
* const player = client.lavalink.createPlayer({
* guildId: interaction.guildId,
* voiceChannelId: interaction.member.voice.channelId,
* // everything below is optional
* textChannelId: interaction.channelId,
* volume: 100,
* selfDeaf: true,
* selfMute: false,
* instaUpdateFiltersFix: true,
* applyVolumeAsFilter: false
* //only needed if you want to autopick node by region (configured by you)
* // vcRegion: interaction.member.voice.rtcRegion,
* // provide a specific node
* // node: client.lavalink.nodeManager.leastUsedNodes("memory")[0]
* });
* ```
*/
createPlayer: (options: PlayerOptions) => Player;
/**
* Add an ARL to the Deezer list
* @param valueOrValues The ARL(s) to add
* @param type The type of the ARL to add (optional)
*/
addDeezerArl(valueOrValues: string | string[], type?: "free" | "premium"): string[];
/**
* Remove an ARL from the Deezer list
* @param valueOrValues The ARL(s) to remove
* @param type The type of the ARL to remove (optional)
*/
removeDeezerArl(valueOrValues: string | string[], type?: "free" | "premium"): string[];
/**
* Get the next ARL from the Deezer list. It will loop through the list if there are multiple ARLs
* @param type The type of the ARL to get (optional)
* @returns The next ARL or null if there are no ARLs
*/
getDeezerArl(type?: "free" | "premium"): string | null;
}