UNPKG

leref.ts

Version:

Something upcoming for aoi.js and npm packages uses

69 lines (68 loc) 2.62 kB
import { LerefNodes } from "./lerefNodes"; import { LerefLava } from "./lerefLava"; import { Filters } from "../utils/filters"; import { LerefQueueSystem } from "./lerefQueueSystem"; import { PlayerOptions, PlayOptions } from "../utils/typings"; import { VoiceUpdatePayload } from "../utils/payloads"; import { LoopMode, PlayerStates, PlayerVoiceStates } from "../utils/constants"; import { FilterUtils } from "../utils/filterUtils"; export declare class LerefPlayer { /** The queue for the player */ readonly queue: LerefQueueSystem; /** The player options */ readonly options: PlayerOptions; /** The player manager */ readonly lava: LerefLava; /** The player position in milliseconds */ position: number; /** Whether the player is currently replaying */ replaying: boolean; /** Whether the player is connected to voice on node-side */ voiceConnected: boolean; /** Timestamp of the time the player was last updated */ lastUpdated: number; /** The player filters */ filters: Filters; /** The player loop mode */ loop: LoopMode; /** The player state */ state: PlayerStates; /** The player voice state */ voiceState: PlayerVoiceStates; /** The player voice payload */ voice: VoiceUpdatePayload; /** The player play options if its currently playing */ playOptions?: PlayOptions; constructor(lava: LerefLava, options: PlayerOptions); /** The node used by player */ get node(): LerefNodes; /** Move the player to another node */ setNode(node: string): void; /** Connect to the voice channel */ connect(): void; /** Disconnect from the voice channel */ disconnect(): void; /** Play the next track in queue */ play(options: PlayOptions): Promise<void>; /** Patch the player filters */ patchFilters(): void; /** Set the player filters */ setFilters(filters: Filters | FilterUtils): void; /** Set the player volume */ setVolume(volume?: number): void; /** Set the player loop mode */ setLoop(loopMode: LoopMode): void; /** Stops the current track, optionally give an amount to skip to, e.g 5 would play the 5th song */ stop(amount?: number): void; /** Pause the current track */ pause(pause: boolean): void; /** Seek to the position in current track */ seek(position: number): void; /** Destroy the player */ destroy(): void; /** Set a property into metadata */ set(key: string, value: unknown): void; /** Get a property from metadata */ get<T>(key: string): T | undefined; private resolveCurrent; }