🏷️ Correct typings

This commit is contained in:
Androz2091 2021-02-20 16:38:39 +01:00
parent 76c394784e
commit 64e7f06990

15
typings/index.d.ts vendored
View file

@ -46,6 +46,8 @@ declare module 'discord-player' {
public shuffle(message: Message): Queue; public shuffle(message: Message): Queue;
public remove(message: Message, trackOrPosition: Track | number): Track; public remove(message: Message, trackOrPosition: Track | number): Track;
public createProgressBar(message: Message, progressBarOptions: ProgressBarOptions): string; public createProgressBar(message: Message, progressBarOptions: ProgressBarOptions): string;
public seek(message: Message, time: number): Promise<void>;
public moveTo(message: Message, channel: VoiceChannel): void;
public on<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this; public on<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
public once<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this; public once<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
@ -53,13 +55,15 @@ declare module 'discord-player' {
} }
type MusicQuality = 'high' | 'low'; type MusicQuality = 'high' | 'low';
interface PlayerOptions { interface PlayerOptions {
leaveOnEnd: boolean; leaveOnEnd?: boolean;
leaveOnEndCooldown?: number; leaveOnEndCooldown?: number;
leaveOnStop: boolean; leaveOnStop?: boolean;
leaveOnEmpty: boolean; leaveOnEmpty?: boolean;
leaveOnEmptyCooldown?: number; leaveOnEmptyCooldown?: number;
autoSelfDeaf: boolean; autoSelfDeaf?: boolean;
quality: MusicQuality; quality?: MusicQuality;
enableLive?: boolean;
ytdlRequestOptions?: any;
} }
type Filters = type Filters =
| 'bassboost' | 'bassboost'
@ -146,6 +150,7 @@ declare module 'discord-player' {
// these are getters // these are getters
public playing: Track; public playing: Track;
public calculatedVolume: number; public calculatedVolume: number;
public currentStreamTime: number;
} }
class Track { class Track {
constructor(videoData: object, user: User, player: Player); constructor(videoData: object, user: User, player: Player);